Color

Struct representing an RGBA color

Constructors

this
this(ubyte r, ubyte g, ubyte b, ubyte a)

Constructs a new Color from the given red (r), green (g), blue (b) and alpha (a) components

this
this(uint color)

Constructs a color from the encoded 32 bit unsigned integer color

Members

Functions

a
ubyte a()

Gets a reference to the Alpha component of the color

b
ubyte b()

Gets a reference to the Blue component of the color

g
ubyte g()

Gets a reference to the Green component of the color

r
ubyte r()

Gets a reference to the Red component of the color

toInt
uint toInt()

Encodes the color into a 32 bit unsigned integer

Variables

component
ubyte[4] component;

RGBA components of the color

Meta