Site icon Python GUI

Discover Delphi VCL’s Available Colors

pexels anthony shkraba 5475786

Color is used to specify the color of a Windows-only control. It is used by the Color property of many components and by several other properties that specify color values.

The DelphiVCL.Graphic unit contains definitions of useful constants for Color. These constants map either directly to the closest matching color in the system palette (for example, clBlue maps to blue) or to the corresponding system screen element color defined in the Color section of the Windows Control panel (for example, clBtnFace maps to the system color for button faces.)

If you specify Color as a specific 4-byte hexadecimal number instead of using the constants defined in the Vcl.Graphics unit, the low three bytes represent RGB color intensities for blue, green, and red, respectively. The value $00FF0000 (Delphi) or 0x00FF0000 (C++) represents full-intensity, pure blue, $0000FF00 (Delphi) or 0x0000FF00 (C++) is pure green, and $000000FF (Delphi) or 0x000000FF (C++) is pure red. $00000000 (Delphi) or 0x00000000 (C++) is black and $00FFFFFF (Delphi) or 0x00FFFFFF (C++) is white.

If the highest-order byte is zero, the color obtained is the closest matching color in the system palette. If the highest-order byte is one ($01 or 0x01), the color obtained is the closest matching color in the currently realized palette. If the highest-order byte is two ($02 or 0x02), the value is matched with the nearest color in the logical palette of the current device context.

Normal Colors

The following table lists the colors that map to the closest matching color in the system palette. 

 

System Colors

The following table lists the colors that are defined in the Windows Control panel.

 

Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.

Exit mobile version