Struct Color

RGBA double precision color.

struct Color ;

Constructors

NameDescription
this (r, g, b, a) Instantiate a Color given whole integer components in the range 0 through 255.
this (r, g, b, a) Instantiate a Color given double components in the range 0.0 through 1.0.

Fields

NameTypeDescription
a doubleAlpha component.
b doubleGreen component.
black const(Color)Opaque black.
blue const(Color)Opaque blue.
g doubleBlue component.
green const(Color)Opaque green.
r doubleRed component.
red const(Color)Opaque red.
transparent const(Color)Fully transparent black.
white const(Color)Opaque white.

Methods

NameDescription
fromHsv (hue, saturation, value) Instantiate a Color given HSV components.
withAlpha (alpha) Adjust a Colors alpha channel, setting it to the given percentage.