Skip to content

RGBtoHex()

Convert red, green, and blue values to a hex color string.

Color.RGBtoHex(red, green, blue)

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

Parameters

Color.RGBtoHex(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 hexCode

Value Type Description
hexCode str A hex color string, for example "#ff8800".