Color

A color is represented as red, green and blue (r,g,b) components. Additionally, “a” represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1.

Constructors

this
this(float r, float g, float b, float a)
Undocumented in source.

Members

Aliases

lerp
alias lerp = linearInterpolate
Undocumented in source.

Functions

blend
Color blend(Color p_over)
Undocumented in source. Be warned that the author may not have intended to support it.
contrast
void contrast()
Undocumented in source. Be warned that the author may not have intended to support it.
contrasted
Color contrasted()
Undocumented in source. Be warned that the author may not have intended to support it.
gray
float gray()
Undocumented in source. Be warned that the author may not have intended to support it.
hex
Color hex(uint p_hex)
Undocumented in source. Be warned that the author may not have intended to support it.
hue
float hue()
Undocumented in source. Be warned that the author may not have intended to support it.
invert
void invert()
Undocumented in source. Be warned that the author may not have intended to support it.
inverted
Color inverted()
Undocumented in source. Be warned that the author may not have intended to support it.
linearInterpolate
Color linearInterpolate(Color p_b, float p_t)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Color opBinary(Color other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Color opBinary(real_t scalar)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
Color opBinaryRight(real_t scalar)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Color other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(real_t scalar)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
Color opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
saturation
float saturation()
Undocumented in source. Be warned that the author may not have intended to support it.
setHsv
void setHsv(float p_h, float p_s, float p_v, float p_alpha)
Undocumented in source. Be warned that the author may not have intended to support it.
to32
uint to32()
Undocumented in source. Be warned that the author may not have intended to support it.
toARGB32
uint toARGB32()
Undocumented in source. Be warned that the author may not have intended to support it.
toHtml
char[8] toHtml()
Undocumented in source. Be warned that the author may not have intended to support it.
toLinear
Color toLinear()
Undocumented in source. Be warned that the author may not have intended to support it.
value
float value()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

a8
ubyte a8 [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
a8
ubyte a8 [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
b8
ubyte b8 [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
b8
ubyte b8 [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
g8
ubyte g8 [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
g8
ubyte g8 [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
r8
ubyte r8 [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
r8
ubyte r8 [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

_parseCol
float _parseCol(string p_str, int p_ofs)
Undocumented in source. Be warned that the author may not have intended to support it.

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta