[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TColor

Color type used by most LCL drawing functions.

Declaration

Source position: graphics.pp line 73

type TColor = TGraphicsColor;

Description

TColor is an alias for the TGraphicsColor type in GraphType.pp from the LazUtils package. TColor allows hexadecimal values in the range -$7FFFFFFF-1..$7FFFFFFF and represent the minimum and maximum values for the Long data type.

Bytes in the hexadecimal value are used as follows: $OOBBGGRR.

OO
Opacity values are not used for standard LCL colors. $1F is reserved for clNone. $20 is reserved for clDefault.
BB
Blue color level. $00 is none. $FF is full.
GG
Green color level. $00 is none. $FF is full.
RR
Red color level. $00 is none. $FF is full.

There are predefined color constants like those in Delphi, such as: clBlack, clRed, clGreen, and clBlue. There are extended color constants, like: clMoneyGreen and clMedGray. There are special color constants like: clDefault and clNone.

Additionally, there are system color constants like: clWindowText and clForm. These constants have a color and/or pattern depending on the users theme, the LCL control, or the drawing tool (Pen, Brush, Font).

See ColorToRGB and RGBToColor.

See also

TGraphicsColor

ColorToRGB

  

Converts a TColor value to an RGB color constant.

RGBToColor

  

Combines the values for Red, Green and Blue into a TColor value.

clBlack

  

One of the standard colors. Delphi compatible.

clNone

  

One of the special colors.

clDefault

  

The default color of a given control.


Version 3.2 Generated 2024-02-25 Home