Skip to main content

Color.RGBToHSV(Color rgbColor)

Calculates the hue, saturation and value of an RGB input color.

Parameters:

NameTypeDescription
rgbColorColorAn input color.

Returns:

typeDescription
numberOutput variable for hue (H).
numberOutput variable for saturation (S).
numberOutput variable for value (V).

Usage

---@type Color
local rgbColor;


local val0, val1, val2 = Color:RGBToHSV(rgbColor)

Extra Detail

The H, S, and V are output in the range 0.0 to 1.0.