colorHSVToHex function

Syntax

  • string colorHSVToHex(hue, sat, val)

Parameters

  1. huefloat (range[0, 360])
    H value in degrees of HSV color.
  2. satfloat (range[0, 1])
    S value in degrees of HSV color.
  3. valfloat (range[0, 1])
    V value in degrees of HSV color.

Returns

Returns hex color string (format: "#rrggbb") for HSV color.

Description

The colorHSVToHex function converts an HSV color to a hex color string. It converts negative degrees or degrees greater than 360 for hue to the range [0,360]. It clamps sat and val to the range [0,1].

Related

Examples

example.1
	colorHSVToHex(90,0.5,0.5)
	# result = "#608040"

In this topic