While trying to get the RGB values (bytes) of a TFPColor i got confused about the format of TFPColor

Some hardcoded colors (unit FPImage) like colGray, colTea sets the high byte value of Red, Green, Blue fields with the corresponding byte value of RGB and leaves the low byte with 0.

Other colors like colWhite or colFuchsia sets both low and high byte of the fields with the corresponding RGB values.

So whats the correlation of RGB byte values and TFPColor?

Should colWhite be redefined as colWhite : TFPColor = (Red: $ff00; Green: $ff00; Blue: $ff00; Alpha: alphaOpaque)

or

colGray be redefined as colGray : TFPColor = (Red: $8080; Green: $8080; Blue: $8080; Alpha: alphaOpaque) ??

This info will help to fix http://bugs.freepascal.org/view.php?id=15793

Luiz
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to