ColorHSV()

Summary

Creates a color based on hue, saturation and brightness.

Syntax

c = ColorHSV(real hue, real saturation, real value)

Argument Contents
hue Hue in color spectrum, from 0 (red) to 359 (violet), or -1 for an achromatic color (e.g. white, gray, black).
saturation Saturation, from 0 (unsaturated, achromatic) to 1 (maximally saturated, pure color).
value Brightness value from 0 (dark) to 1 (light), with maximally bright pure red, green and blue colors having a value of 1.

Returns

A color (red, green, blue, and alpha).

Notes

  • Pure red with maximum brightness corresponds to (hue = 0, saturation = 1, value = 1). Pure green and pure blue are similar with hues of 120 and 240 respectively.

  • Pure white corresponds to (hue = -1, saturation = 0, value = 1).

  • Pure black corresponds to (hue = -1, saturation = 0, value = 0).

  • Opacity can also be set with the alpha selector on a color; for more information, see Compound Variables.

See Also

Function Summary
ColorRGB() Creates a color based on the amounts of red, green and blue
ColorHLS() Creates a color based on hue, lightness and saturation
ColorCIE() Creates a color based on its (x, y, Y) coordinates in CIE chromaticity space.