Struct Color
RGBA double precision color.
struct Color
;
Constructors
Name | Description |
---|---|
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
Name | Type | Description |
---|---|---|
a
|
double | Alpha component. |
b
|
double | Green component. |
black
|
const(Color) | Opaque black. |
blue
|
const(Color) | Opaque blue. |
g
|
double | Blue component. |
green
|
const(Color) | Opaque green. |
r
|
double | Red component. |
red
|
const(Color) | Opaque red. |
transparent
|
const(Color) | Fully transparent black. |
white
|
const(Color) | Opaque white. |
Methods
Name | Description |
---|---|
fromHsv
(hue, saturation, value)
|
Instantiate a Color given HSV components.
|
withAlpha
(alpha)
|
Adjust a Color s alpha channel, setting it to the given percentage.
|