ColorRGB

An RGB(A) Color.

Constructors

this
this()
this
this(ubyte red, ubyte green, ubyte blue, ubyte opacity = 0)

Create a Color from the specified Bytes.

this
this(double red, double green, double blue, double opacity = 0)

Create a Color from the specified doubles. The values should be between 0.0 and 1.0.

this
this(string color)

Create a Color from a X11 color specification string

Members

Functions

blue
void blue(double blue)
double blue()

The value for blue as a double in the range [0.0 .. 1.0]

blueByte
void blueByte(ubyte blue)
ubyte blueByte()

The value for blue as a byte

green
void green(double green)
double green()

The value for green as a double in the range [0.0 .. 1.0]

greenByte
void greenByte(ubyte green)
ubyte greenByte()

The value for green as a byte

red
void red(double red)
double red()

The value for red as a double in the range [0.0 .. 1.0]

redByte
void redByte(ubyte red)
ubyte redByte()

The value for red as a byte

Inherited Members

From Color

opEquals
bool opEquals(Object obj)
toString
string toString()

Returns the value as a hex string.

opCast
T opCast()

Support casting between different colors. You can also use std.conv.to

redQuantum
void redQuantum(Quantum red)
Quantum redQuantum()

The value for red in the range [0 .. QuantumRange]

greenQuantum
void greenQuantum(Quantum green)
Quantum greenQuantum()

The value for green in the range [0 .. QuantumRange]

blueQuantum
void blueQuantum(Quantum blue)
Quantum blueQuantum()

The value for blue in the range [0 .. QuantumRange]

opacityByte
void opacityByte(ubyte opacity)
ubyte opacityByte()

The opacity as a byte. [0 .. 255]

opacityQuantum
void opacityQuantum(Quantum opacity)
Quantum opacityQuantum()

The value for opacity in the range [0 .. QuantumRange]

opacity
void opacity(double opacity)
double opacity()

The value for opacity as a double in the range [0.0 .. 1.0]

intensity
double intensity()

The intensity of this color.

clone
Color clone()

Create a copy of this Color.

name
string name()

Returns the name of the color or the value as a hex string.

Meta