Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32🞂Color32Function

Color32

Constructs a TColor32 value

Declarations ​

pascal
function Color32(R, G, B: Byte; A: Byte = $FF): TColor32; overload;
function Color32(WinColor: TColor): TColor32; overload;
function Color32(Index: Byte; var Palette: TPalette32): TColor32; overload;
Overload Details

Overload 1 ​

pascal
function Color32(R, G, B: Byte; A: Byte = $FF): TColor32; overload;

Constructs a TColor32 value from individual Red, Green, Blue, and optional Alpha byte components.

ParameterTypeDescription
RByteRed component (0..255).
GByteGreen component (0..255).
BByteBlue component (0..255).
AByteAlpha component (0..255, defaults to $FF / opaque).
TypeDescription
TColor32The constructed 32-bit ARGB TColor32 value.

Overload 2 ​

pascal
function Color32(WinColor: TColor): TColor32; overload;

Converts a native VCL/FCL TColor value to a 32-bit TColor32 value with 100% opacity (Alpha = $FF).

ParameterTypeDescription
WinColorTColorVCL/FCL 24-bit color value.
TypeDescription
TColor32The converted opaque 32-bit ARGB TColor32 value.

Overload 3 ​

pascal
function Color32(Index: Byte; var Palette: TPalette32): TColor32; overload;

Retrieves a TColor32 value from a 256-color TPalette32 array by index.

ParameterTypeDescription
IndexBytePalette index (0..255).
PaletteTPalette32Palette lookup table.
TypeDescription
TColor32The 32-bit ARGB TColor32 value stored at Index in the palette table.

Description ​

Color32 constructs a 32-bit ARGB TColor32 value from RGB/Alpha components, VCL TColor values, or palette entries.