Color

Undocumented in source.

Constructors

this
this(float val)
Undocumented in source.
this
this(float val, float a)
Undocumented in source.
this
this(float[3] vals)
Undocumented in source.
this
this(float[4] vals)
Undocumented in source.

Alias This

data

Members

Aliases

arrayof
alias arrayof = data
Undocumented in source.

Functions

a8
ubyte a8()
Undocumented in source. Be warned that the author may not have intended to support it.
asVector3f
Vector3f asVector3f()
Undocumented in source. Be warned that the author may not have intended to support it.
asVector4f
Vector4f asVector4f()
Undocumented in source. Be warned that the author may not have intended to support it.
b8
ubyte b8()
Undocumented in source. Be warned that the author may not have intended to support it.
clamp
void clamp(float min, float max)

Clamps color values between min and max

copyof
Color copyof()
Undocumented in source. Be warned that the author may not have intended to support it.
darken
void darken(float p_amount)

Darkens color by p_amount

g8
ubyte g8()
Undocumented in source. Be warned that the author may not have intended to support it.
hue
float hue()

Returns h component of hsv

invert
void invert()

Inverts color

lerp
void lerp(Color p_to, float p_weight)

Returns the linear interpolation with another color

lighten
void lighten(float p_amount)

Lightens color by p_amount

luminance
float luminance()

Returns the luminance of the color in the [0.0, 1.0] range

opBinary
auto opBinary(Color!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(R b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(Color!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(R b)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(Color!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Color!(R, 4) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(Color!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(R b)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
r8
ubyte r8()
Undocumented in source. Be warned that the author may not have intended to support it.
saturation
float saturation()

Returns s component of hsv

setAnsi
void setAnsi(int ansi)

Sets color from ANSI256 index

setAnsi8
void setAnsi8(int ansi)

Sets color from ANSI index

setHex
void setHex(uint p_hex, bool p_hasAlpha)

Sets color to hexadecimal value

setHsv
void setHsv(float p_h, float p_s, float p_v, float p_alpha)

Sets color from hsv

setHtml
void setHtml(string html)

Sets color from html string in format #RRGGBB

toAnsi
int toAnsi()

Returns closest ANSI256 color index

toAnsi8
int toAnsi8(bool isBackground)

Returns closest ANSI8 color index

toAnsi8String
string toAnsi8String(bool isBackground)

Returns closest bash ANSI8 color string

toAnsiString
string toAnsiString(bool isBackground)

Returns closest bash ANSI256 color string

toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toHex
uint toHex()

Returns hex representation of color in format 0xrrggbb

toHtml
string toHtml(bool p_alpha)

Returns html representation of color in format #RRGGBB

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
toTrueColorString
string toTrueColorString(bool isBackground)

Returns bash truecolor string

value
float value()

Returns v component of hsv

Manifest constants

AccessString
enum AccessString;
Undocumented in source.

Mixins

__anonymous
mixin accessByString!(float, 4, "data", AccessString)
Undocumented in source.

Variables

data
float[4] data;
Undocumented in source.

Mixed In Members

From mixin accessByString!(float, 4, "data", AccessString)

opDispatch
T opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
T opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
auto opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
U opDispatch [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta