Construct a color with the given values. They should be in range 0 <= x <= 255, where 255 is maximum intensity and 0 is minimum intensity.
Construct a color from components[0 .. 4]. It must have length of at least 4 and be in r, g, b, a order.
Constructs a color from floating-point rgba components, each between 0 and 1.0.
Constructs a color from a ColorF (floating-point)
this mixin can be used to alphablend two uint colors; colu32name is variable that holds color to blend, destu32name is variable that holds "current" color (from surface, for example). alpha value of destu32name doesn't matter. alpha value of colu32name means: 255 for replace color, 0 for keep destu32name.
Perform alpha-blending of fore to this color, return new color. WARNING! This function does blending in RGB space, and RGB space is not linear!
The components as a single 32 bit value (beware of endian issues!)
Returns a value compatible with a Win32 COLORREF.
The components as a single 32 bit value (beware of endian issues!)
Return black-and-white color
Makes a string that matches CSS syntax for websites
returns RRGGBBAA, even if a== 255
Makes a hex string RRGGBBAA (aa only present if it is not 255)
Static convenience functions for common color names
from hsl
Like the constructor, but this makes sure they are in range before casting. If they are out of range, it saturates: anything less than zero becomes zero and anything greater than 255 becomes 255.
Gets a color by name, iff the name is one of the static members listed above
Reads a CSS style string to get the color. Understands #rrggbb, rgba(), hsl(), and rrggbbaa
Constructs a Color from a Win32 COLORREF.
Static convenience functions for common color names
Static convenience functions for common color names
[r, g, b, a]
Represents an RGBA color