Color4f

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

Constructors

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

CTor

this
this(float red, float green, float blue, float alpha = 1)

CTor Expect that every component is in range 0.0 .. 1.0

this
this(ref const Color4b col)

CTor

Members

Functions

asRGB
float[3] asRGB()

Returns RGB the color information as static array

asRGBA
float[4] asRGBA()

Returns the RGBA color information as static array

opEquals
bool opEquals(ref const Color4f col)

opEquals: compares two Colors.

Static variables

Black
Color4f Black;

Black Color (0, 0, 0)

Blue
Color4f Blue;

Blue Color (0, 0, 255)

Cyan
Color4f Cyan;

Cyan Color (0, 255, 255)

Gray
Color4f Gray;

Gray Color (179, 179, 179)

Green
Color4f Green;

Green Color (0, 255, 0)

Magenta
Color4f Magenta;

Magenta Color (255, 0, 255)

Red
Color4f Red;

Red Color (255, 0, 0)

White
Color4f White;

White Color (255, 255, 255)

Yellow
Color4f Yellow;

Yellow Color (255, 255, 0)

Variables

alpha
float alpha;

The color components

blue
float blue;

The color components

green
float green;

The color components

red
float red;

The color components

Meta

Authors

Randy Schuett (rswhite4@googlemail.com)