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

JoshyFun joshyfun at gmail.com
Wed Feb 17 17:30:30 CET 2010

Hello Graeme,

Wednesday, February 17, 2010, 2:57:07 PM, you wrote:

GG> Yes, that is always ideal, but I can only work with what I know and what I
GG> can find on the internet. If you have a link on the internet that defines
GG> color values in 48bit, then please do post it here. I have search for the
GG> last 30 minutes and haven't found a single link.

You will not find nothing quite sure as 24 bits is quite closer to our
color perception capability.

GG> All colors I could find are defined as 24-bit RGB values (certified values
GG> and color names created by companies like Microsoft, HP, Adobe, W3C, Exif
GG> etc.), so that is what I based my calculations on. Using ratios to do the
GG> upscaling calculation seems to be the most common conversion method too -
GG> as per the links I found on the internet (wikipedia and many websites like
GG> Adobe or other photographic websites).

The problem is that for each 24 bit colors there are 16.1 million
equivalent colors in 48 bits so any test like:

if Pixel[x,y]=clMaroon then blah, blah...

will only be true 1/16000000 times, so that compare is not logical due
different bases.

Any other discussion about the low byte of 48 bit colors is useless

$8001 is in 24 bits the same as $80FF in 24 bits, and there is not
proper upscaling, as clMaroon is not $8080 nor $8000, nor $80FF. It is
a 48 bits value defined by somebody using any upscaling or downscaling

Colorimetric is a "dangerous" field for programmers. We are used to
think in RGB values, but once you work a bit with temperature or
different codifications like YUV, YUY, CMYK or any other you end
knowing that 2+2=2.12321+-2*pi when the wind blows from the north :)

GG> But yes I understand the most accurate would be to only downscale - but I
GG> can't find color name definitions in 48-bit color.

As 24 bit versions of clXXXX colors are compatible with Delphi any 48
bit definition is valid from my point of view.

Best regards,

More information about the fpc-devel mailing list