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

TColorRef

Represents color constants in the LCL.

Declaration

Source position: lcltype.pp line 1673

type TColorRef = COLORREF;

Description

TColorRef is an alias for the COLORREF type, and is used for color constants defined in the LCL.

Values from 0..$FFFFFF are BGR colors. The lowest 8 bit are the blue component, the middle 8 bit the green component and the highest 8 bit the red component. Use the functions Red, Green, Blue to extract the components, RedGreenBlue to extract all three components and RGBToColor to convert the three colors to a TColor.

Values with highest bit set are system colors or themed colors. For example clNone, clBackground, clButton, clWindowText. Their actual value depend on the context (i.e. the used Canvas) and they are not valid in all contexts. For example clWindowText might only work for Font.Color, not for Brush.Color or Pen.Color. clBackground might be a color, gradient, pattern or image, depending on theme and control type.

A system color can change during run-time, so do not store them. Use system colors only on LCL control Canvas. They probably are not defined for printer canvas and some are not defined on bitmap canvas.

See also

COLORREF

  

Represents color constants in the LCL.


Version 3.2 Generated 2024-02-25 Home