Syntax
- string colorRGBToHex(r, g, b)
Parameters
- r—float (range[0, 1])R value of RGB color.
- g—float (range[0, 1])G value of RGB color.
- b—float (range[0, 1])B value of RGB color.
Returns
Returns hex color string (format: "#rrggbb") for RGB color in [0,1].
Description
The colorRGBToHex converts an RGB color to a hex color string. It clamps r, g, and b to the range [0,1].
Related
Examples
example.1
colorRGBToHex(0,0.5,1)
# result = "#0080FF"