[fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Feb 17 13:40:18 CET 2010


Graeme Geldenhuys wrote:
> value per 48-bit color channel (65536) I calculated the same 48-bit red
> channel color. 65536 * 0.5 = 32768 = in hex $8080.

Sorry, I'm talking bull here! :-/   No idea how I got to $8080. 32768 is
$8000 in hex.



> 128/255  = 32896/65536 =  red channel $80 (in RGB 24-bit) or $8080 (in
> 48-bit) color.

I see my problem! I used 255 as the max value per channel (24-bit color),
when it should have been 256.  :-(



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-devel mailing list