Sign in Join
FPDoc Onlineexperiment

TColor type

In unit Graphics

Color type used by most LCL drawing functions.

Declaration

pascal
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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.