Back to website >

TColor (Pascalscript)

Colors are stored in a four-byte numerical value. The three least significant bytes indicate the RGB color intensity for blue, green and red. The value $00FF0000 corresponds to a pure blue with full intensity, the value $0000FF00 to a pure green and the value $000000FFFF to a pure red. $0000000000 indicates black and $00FFFFFF white.

If the most significant byte is zero ($00), you get a color most similar to that in the system palette. If the highest byte is one ($01), this results in a color most similar to that in the currently realized palette. If you set the most significant byte to two ($02), the value is adjusted to the most similar color in the logical palette of the current device context.

The following table contains the color constants that you can use for simplification.

clAqua aquamarine
clBlack black
clBlue azure
clDkGray dark grey
clFuchsia purple
clGray gray
clGreen spades
clLime light green
clLtGray light grey
clMaroon dark red
clNavy dark blue
clOlive ochre
clPurple violet
clRed red
clSilver silver (light grey)
clTeal teal
clWhite white
clYellow amber