Color-Functions

LA.Docs
March 1st, 2016

List of Color-Functions


Native color is represented by $00 BB GG RR. For example Color Red = $000000FF

RGB color is represented by RRR GGG BBB. For Example Color Red = RGBToColor(255, 0, 0)

Web color is represented by RR GG BB. For Example Color Red = HexToColor(’#FF0000’)


BlueValue(rgb: int): Byte

Returns the Blue value of given color.

ColorToHex(Color : int) : string

Converts a color value to a web hex-color string. For example #ffff00.

ColorToRGB(Color: int): int

Converts a color value to a RGB-color value.

ColorToString(Color: int): string

Convert color to a string. If color is a known color, for example Blue, then clBlue will be returned, otherwise a hex string value will be returned, for example $00dd8d0d

DecColor(AColor: int; AQuantity: Byte): int

Decrease the color value by given quantity.

GreenValue(rgb: int): Byte

Returns the Green value of given color.

HexToColor(sColor : string) : int

Converts a web hex string to a color. You can pass any web color starting with #. For example #ffff00.

IsSysColor(AColor: int): bool

Returns true if given color is a system color like, clMenu, clWindow, clForm, etc.

RedValue(rgb: int): Byte

Returns the Red value of given color.

RGBToColor(R, G, B: Byte): int

Converts an RGB color to a color value.

StringToColor(const S: string): int

Converts given string to a color. You can pass known colors like ’clBlue’, clGreen’, etc. or you can pass a hex string like ’$003e3e3e’.

StringToColorDef(const S: string; defColor: int): int

Converts given string to a color. You can pass known colors like ’clBlue’, clGreen’, etc. or you can pass a hex string like ’$003e3e3e’. If the conversion fails, the defColor is returned.