[Lazarus] TColor and Alpha channel support

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Sep 26 13:33:34 CEST 2016


On Mon, 26 Sep 2016 11:37:48 +0100
Graeme Geldenhuys via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Hi,
> 
> All LCL colors seem to be defined in the format TColor($BBGGRR) - all
> without the Alpha channel information.

Correct.


>  Does TColor support the Alpha channel,

No.
The hi byte is used for system colors. Under Delphi also for palette.
The idea is to use the FPColor property for alpha, but that is not
implemented yet by the LCL interfaces. Hmm, I wonder how hard it would
be...


>[...]
> Inconsistency noted:
> --------------------
>   Also there is an inconsistency at least with LCL-GTK2's Color Select
> dialog. If I type the hex color Red in the Color Select Dialog, the
> format must be typed as FF0000  (RRGGBB), but when I code the color Red
> in Lazarus, it must be typed as 0000FF  (BBGGRR).  I guess because of
> the LCL "native widget set" idea, there is nothing that can be done
> about this.

Usually I use the RGBToColor function, so I only see RGB.

Mattias


More information about the Lazarus mailing list