colorRGBOToHex function

string colorRGBOToHex(red, green, blue, opacity)

red float Red value in [0,1] of RGB color.

green float Green value in [0,1] of RGB color.

blue float Blue value in [0,1] of RGB color

opacity float Opacity value in [0,1]

Returns a hexadecimal color string (format: "#rrggbboo") for an RGB color in [0,1] with opacity in [0,1].

This function converts an RGB color with opacity to a hexadecimal color string. It clamps red, green, blue, and opacity to the range [0,1].

Related

Examples

Example

colorRGBOToHex(0,0.5,1,0.5)
# result = "#0080FF80"