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

Michael Van Canneyt michael at freepascal.org
Wed Feb 17 13:35:09 CET 2010



On Wed, 17 Feb 2010, Graeme Geldenhuys wrote:

> Michael Van Canneyt wrote:
>>> 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);
>>
>> This is not so.
>>
>> Both definitions are - within the 256-bit color plane - 100% equivalent.
>
>
> I'm no color expert (maybe that shows), but I based the calculation on
> ratio information only. Maroon has a red channel value in 24-bit color set
> to $80. That's 128/256 giving you a 0.5 ratio.

But this ratio is not *the* definition of maroon.

You happen choose to use the ratio as the basis of your definition.
Someone else may decide on some other definition. Who is right ?

Like I said, you must have a 48-bit definition of Maroon. 
Only then you can correctly define maroon in TFPColor.

I was once asked to define a metric for colors. 
There are many metrics available, more than I imagined.

Michael.



More information about the fpc-devel mailing list