Skip to content

RGBtoHSB()

Convert a color from RGB to HSB (hue, saturation, brightness).

Color.RGBtoHSB(red, green, blue)

Color.RGBtoHSB is a static utility. Call it on the class itself, for example Color.RGBtoHSB().

Parameters

Color.RGBtoHSB(red, green, blue)
Parameter Type Default Description
red int required The red component, from 0 to 255.
green int required The green component, from 0 to 255.
blue int required The blue component, from 0 to 255.

Returns

return hue, saturation, brightness

Value Type Description
hue float The hue, from 0.0 to 1.0.
saturation float The saturation, from 0.0 to 1.0.
brightness float The brightness, from 0.0 to 1.0.