rgb
Encodes a colour using RGB (red, green, blue) coordinates.
Syntax
-
rgb(r, g, b)
-
r
is a real number in [0, 1] -
g
is a real number in [0, 1] -
b
is a real number in [0, 1]
-
Description
rgb(r, g, b)
is the colour object corresponding to the colour with RGB (red, green, blue) coordinates (r, g, b)
. Each coordinate is a real number in [0, 1].
Examples
rgb(1, 0, 0)
rgba(1.000, 0.000, 0.000, 1.000) (#FF0000, red)