rgbObjToHex()
The rgbObjToHex
function allows you to convert an RGB object to its corresponding hexadecimal color code.
Usage
Parameters
rgbObjToHex(rgbObj)
Parameter | Type | Required | Description |
---|---|---|---|
rgbObj | RgbObj | true | An RGB object that represents a color in the RGBA (Red, Green, Blue, Alpha) color space. |
Return Value
The rgbObjToHex
function returns the hexadecimal value of the color as a string
.
If the input object’s alpha channel value is not equal to 1, the resulting hex code will
include an additional number representing the alpha channel.