ColorGray

A Gray scale color.

Constructors

this
this()
this
this(ubyte shade, ubyte opacity)

Create a Color from the specified Bytes.

this
this(double shade, double opacity)

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

Members

Functions

shade
void shade(double shade)
double shade()

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

Inherited Members

From Color

packet
PixelPacket* packet;
Undocumented in source.
pixelPacket
PixelPacket pixelPacket()
Undocumented in source. Be warned that the author may not have intended to support it.
pixelPacket
void pixelPacket(PixelPacket packet)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object obj)
toString
string toString()

Returns the value as a hex string.

opCast
Object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

scaleDoubleToQuantum
Quantum scaleDoubleToQuantum(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
scaleQuantumToDouble
double scaleQuantumToDouble(Quantum value)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta