Scintilla Colours

From: Date: Thu, 30 Jan 2003 02:55:55 +0000
Subject: Scintilla Colours
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2987@lists.php.net to get a copy of this message
Using methods such as "set_sel_fore" on a scintilla widget demands that the second argument be an integer representing the colour. I went to the scintilla homepage here: http://www.scintilla.org/ScintillaDoc.html#colour And it says: Colours are set using the RGB format (Red, Green, Blue). The intensity of each colour is set in the range 0 to 255. If you have three such intensities, they are combined as: red | (green << 8) | (blue << 16). I know the << operator is a binary shift operator but I don't know exactly how it works in terms of decimal numbers. Basically id like an example of how to convert three RGB numbers (e.g. R:10, G:36, B:106) to this integer equivalent. I had a look through PHPmole and all the settings are in the integer form so not much help. Any help appreciated.

« previous php.gtk.general (#2987) next »