Color4b

Color4b defines a structure which contains 4 ubyte values, each for red, green, blue and alpha.

Constructors

this
this(ubyte red, ubyte green, ubyte blue, ubyte alpha = 255)

CTor

this
this(uint hexValue)

CTor

this
this(ref const Color4f col)

CTor

Members

Functions

asHex
uint asHex()

Returns the RGBA color information as hex value

asRGB
ubyte[3] asRGB()

Returns RGB the color information as static array

asRGBA
ubyte[4] asRGBA()

Returns the RGBA color information as static array

opEquals
bool opEquals(ref const Color4b col)

opEquals: compares two Colors.

withTransparency
Color4b withTransparency(ubyte alpha)

Returns a copy of the current Color with a given transpareny.

Static variables

Black
Color4b Black;

Black Color (0, 0, 0)

Blue
Color4b Blue;

Blue Color (0, 0, 255)

Cyan
Color4b Cyan;

Cyan Color (0, 255, 255)

Gray
Color4b Gray;

Gray Color (179, 179, 179)

Green
Color4b Green;

Green Color (0, 255, 0)

Magenta
Color4b Magenta;

Magenta Color (255, 0, 255)

Red
Color4b Red;

Red Color (255, 0, 0)

White
Color4b White;

White Color (255, 255, 255)

Yellow
Color4b Yellow;

Yellow Color (255, 255, 0)

Variables

alpha
ubyte alpha;

The color components

blue
ubyte blue;

The color components

green
ubyte green;

The color components

red
ubyte red;

The color components

Meta

Authors

Randy Schuett (rswhite4@googlemail.com)