colorRGBOToHex function

Syntax

  • string colorRGBOToHex(r, g, b, o)

Parameters

  1. rfloat (range[0, 1])
    R value of RGB color.
  2. gfloat (range[0, 1])
    G value of RGB color.
  3. bfloat (range[0, 1])
    B value of RGB color.
  4. ofloat (range[0, 1])
    Opacity value.

Returns

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

Description

The colorRGBOToHex converts an RGB color to a hex color string. It clamps r, g, b, o to the range [0,1].

Related

Examples

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

In this topic