[fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)
Graeme Geldenhuys
graemeg.lists at gmail.com
Wed Feb 17 11:28:50 CET 2010
Luiz Americo Pereira Camara wrote:
>
> The point is that the TFPColor constants are inconsistently defined.
I see your point and agree. Some colors have both high and low byte set,
some other colors do not.
@Mattias
What is the 48bit value for Maroon (#800000)? R = $8000 or R = $8080 and
assuming all the other values are $0000
As defined by fpImage unit.
colMaroon : TFPColor = (Red: $8000; Green: $0000; Blue: $0000; Alpha:
alphaOpaque);
This is *incorrect*. It should be:
colMaroon : TFPColor = (Red: $8080; Green: $0000; Blue: $0000; Alpha:
alphaOpaque);
128/255 = 32896/65536 = red channel $80 (in RGB 24-bit) or $8080 (in
48-bit) color.
I think this is the point Luiz is trying to make.
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