Skip to content

TSdlColor

A structure that represents a color as 8-bit RGBA components.

The bits of this structure can be directly reinterpreted as an integer-packed color which uses the TSdlPixelFormat.Rgba32 format (TSdlPixelFormat.Abgr8888 on little-endian systems and TSdlPixelFormat.Rgba8888 on big-endian systems).

Definition

Unit: Neslib.Sdl3.Video

type TSdlColor = record ... end;

Fields

Name Description
A
B
G
R

Constructors

Name Description
Create Create a color.

Methods

Name Description
Init Initializes the a color.

Field Descriptions

A

var A: Byte

Type: Byte


B

var B: Byte

Type: Byte


G

var G: Byte

Type: Byte


R

var R: Byte

Type: Byte


Constructor Descriptions

Create

Create a color.

constructor Create(const AR, AG, AB: Byte; const AA: Byte = 255)

Parameters

AR: Byte : The red value.

AG: Byte : The green value.

AB: Byte : The blue value.

AA: Byte = 255 : (Optional) alpha value. Defaults to 255

Remarks

It is safe to call this constructor from any thread.


Method Descriptions

Init(Byte, Byte, Byte, Byte)

Initializes the a color.

procedure Init(const AR, AG, AB: Byte; const AA: Byte = 255); inline

Parameters

AR: Byte : The red value.

AG: Byte : The green value.

AB: Byte : The blue value.

AA: Byte = 255 : (Optional) alpha value. Defaults to 255

Remarks

It is safe to call this method from any thread.