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.
| Parameter | Type | Description |
|---|---|---|
R | Byte | Red component (0..255). |
G | Byte | Green component (0..255). |
B | Byte | Blue component (0..255). |
A | Byte | Alpha component (0..255, defaults to $FF / opaque). |
| Type | Description |
|---|---|
TColor32 | The 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).
| Parameter | Type | Description |
|---|---|---|
WinColor | TColor | VCL/FCL 24-bit color value. |
| Type | Description |
|---|---|
TColor32 | The 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.
| Parameter | Type | Description |
|---|---|---|
Index | Byte | Palette index (0..255). |
Palette | TPalette32 | Palette lookup table. |
| Type | Description |
|---|---|
TColor32 | The 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.