utils.utils.hex_to_rgb
Declaration
lua
utils.hex_to_rgb(hex)
Description
Convert hex color string to RGB.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
hex | string | Required | — | "#RRGGBB" or "RRGGBB" |
Return Values
| Type | Description |
|---|---|
| integer | R |
| integer | G |
| integer | B |
Example
lua
local r,g,b = utils.hex_to_rgb("#FF0000")