Color

Undocumented in source.

Constructors

this
this(T red, T green, T blue, T alpha)

Color constructor for four components, the latter which is optional.

this
this(R value)

Parses a color from the input.

Members

Aliases

Type
alias Type = T
Undocumented in source.
a
alias a = alpha
Undocumented in source.
b
alias b = blue
Undocumented in source.
g
alias g = green
Undocumented in source.
r
alias r = red
Undocumented in source.

Functions

isDark
bool isDark()

Whether the color is dark.

isLight
bool isLight()

Whether the color is light.

opAssign
void opAssign(R value)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Color!T opBinary(T koe)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Color!T opBinary(float koe)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Color!T opBinary(Color!T color)
Undocumented in source. Be warned that the author may not have intended to support it.
to
R to()
Undocumented in source. Be warned that the author may not have intended to support it.
toBytes
T[] toBytes()

Returns an array of components.

toGrayscale
Color!T toGrayscale()

Converts the color to black and white.

toGrayscaleFloat
float toGrayscaleFloat()

Converts the color to black and white.

toGrayscaleNumber
T toGrayscaleNumber()

Converts the color to black and white.

Manifest constants

Max
enum Max;
Undocumented in source.
Max
enum Max;
Undocumented in source.
Min
enum Min;
Undocumented in source.
Min
enum Min;
Undocumented in source.

Properties

af
float af [@property getter]
float af [@property setter]

Returns a alpha value in the form of a range from 0 to 1.

bf
float bf [@property getter]
float bf [@property setter]

Alpha value in the form of a range from 0 to 1.

gf
float gf [@property getter]
float gf [@property setter]

Green value in the form of a range from 0 to 1.

invertAlpha
T invertAlpha [@property getter]

Invert alpha value

inverted
Color!T inverted [@property getter]

Will return the color opposite to itself.

rf
float rf [@property getter]
float rf [@property setter]

Red value in the form of a range from 0 to 1.

Variables

alpha
T alpha;

Alpha component

blue
T blue;

Blue component

green
T green;

Green component

red
T red;

Red component

Meta