rgb

The rgb function is the same as in CSS color specifications.

Expected values ranges from 0 to 255.

Instead of being either numbers or percentages, all values here are assumed to be numbers from 0 to 255. However, internally the color will be stored with higher accuracy, as per CSS spec.

pure nothrow @nogc @safe
rgb
(
float red
,
float green
,
float blue
,
float alpha = 1.0f
)

Parameters

red float

Red value in 0 to 255.0f.

green float

Green value in 0 to 255.0f.

blue float

Blue value in 0 to 255.0f.

alpha float

Alpha value in 0 to 1.0f (opacity).

Meta