ColorYUV

The YUV color format describes a color by using the color components luminance and chrominance. The luminance component (Y) represents the brightness information of a color, the chrominance components (U and V) contain the color differences.

The YUV color format was developed for analog TV transmissions to provide compatibility between black-and-white television and color television: The luminance component is sufficient for black-and-white TV sets, whereas color TV sets need the additional chrominance information.

Constructors

this
this()
this
this(double y, double u, double v, double opacity = 0)

Create a YUV Color from the specified doubles.

this
this(string color)

Create a Color from a X11 color specification string

Members

Functions

u
double u()

The value for U chrominance component in the range [-0.5 .. 0.5]

u
void u(double u)

The value for U chrominance component in the range [-0.5 .. 0.5]

v
void v(double v)
double v()

The value for V chrominance component in the range [-0.5 .. 0.5]

y
void y(double y)
double y()

The value for the luminance in the range [0.0 .. 1.0]

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