Color

Color value representation

Constructors

this
this(ubyte alpha, Color c)
this(ubyte red, ubyte green, ubyte blue)
this(ubyte alpha, ubyte red, ubyte green, ubyte blue)

Construct a new color.

Members

Functions

blendColor
Color blendColor(Color wc)

Blend colors; alpha channels are ignored.

solidColor
Color solidColor(Color backColor)

Alpha blend this color with a background color to return a solid color (100% opaque).

toArgb
COLORREF toArgb()

Return the numeric color value.

toRgb
COLORREF toRgb()

Return the numeric red, green and blue color value.

Properties

a
ubyte a [@property getter]
b
ubyte b [@property getter]

Red, green, blue and alpha channel color values.

empty
Color empty [@property getter]

Construct a new color.

g
ubyte g [@property getter]

Red, green, blue and alpha channel color values.

r
ubyte r [@property getter]

Red, green, blue and alpha channel color values.

transparent
Color transparent [@property getter]

Return a completely transparent color value.

Static functions

fromArgb
Color fromArgb(ubyte alpha, ubyte red, ubyte green, ubyte blue)
fromRgb
Color fromRgb(COLORREF rgb)
Color fromRgb(ubyte alpha, COLORREF rgb)

Construct a new color.

Meta