HexToRGBA: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server & Client|1.0}} | {{Info|Function|Server & Client|1.0}} | ||
{{FuncDescription|Converts | {{FuncDescription|Converts an integer color value to the RGB format.}} | ||
{{FuncSyntax|HexToRGBA(HexColor)}} | {{FuncSyntax|HexToRGBA(HexColor)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|HexColor|Color in | {{FuncParam|HexColor|Color in integer format}} | ||
{{FuncReturnValue|R, G, B, A values between 0 and 255}} | {{FuncReturnValue|R, G, B, A values between 0 and 255}} | ||
Line 15: | Line 15: | ||
return r, g, b, a = HexToRGBA(hex) | return r, g, b, a = HexToRGBA(hex) | ||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[RGB]] | |||
* [[RGBA]] | |||
* [[HexToRGBAFloat]] |
Latest revision as of 17:36, 16 July 2020
Description
Converts an integer color value to the RGB format.
Syntax
HexToRGBA(HexColor)
Parameters
- HexColor
Color in integer format
Return Value
- R, G, B, A values between 0 and 255
Example
function convertColor(hex)
return r, g, b, a = HexToRGBA(hex)
end