colorRGBOToHex function

Syntax

  • string colorRGBOToHex(red, green, blue)

Parameters

  1. redfloat (range[0, 1])
    Red value of RGB color.
  2. greenfloat (range[0, 1])
    Green value of RGB color.
  3. bluefloat (range[0, 1])
    Blue value of RGB color.
  4. opacityfloat (range[0, 1])
    Opacity value.

Returns

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

Description

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

Related

Examples

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

In this topic