Color

Represents an RGBA color

Constructors

this
this(int red, int green, int blue, int alpha = 255)

.

Members

Functions

toCssString
string toCssString()

Makes a string that matches CSS syntax for websites

toRgbaHexString
string toRgbaHexString()

returns RRGGBBAA, even if a== 255

toString
string toString()

Makes a hex string RRGGBBAA (aa only present if it is not 255)

Static functions

fromHsl
Color fromHsl(real h, real s, real l)

from hsl

fromNameString
Color fromNameString(string s)

Gets a color by name, iff the name is one of the static members listed above

fromString
Color fromString(string s)

Reads a CSS style string to get the color. Understands #rrggbb, rgba(), hsl(), and rrggbbaa

transparent
Color transparent()

Convenience functions for common color names

Unions

__anonymous
union __anonymous

Meta