Wowpedia
Advertisement
These functions are implemented by FrameXML in FrameXML/Util.lua.

Creates a ColorMixin.

color = CreateColor(r, g, b [, a])
color = CreateColorFromBytes(r, g, b, a)
color = CreateColorFromHexString(hexColor)

Arguments

CreateColor()
r, g, b 
number - Values between 0 and 1.
number?Optional. Could be nil. - Value between 0 and 1, or nil to leave undefined (some methods will default to 100%).
CreateColorFromBytes()
r, g, b, a 
number - Values between 0 and 255 (cannot omit alpha).
CreateColorFromHexString()
hexColor 
string - Eight hexadecimal digits as AARRGGBB.

Returns

color 
table - ColorMixin

Patch changes

External links

CreateColor()
CreateColorFromBytes()
CreateColorFromHexString()

References

 
  1. ^ 2018-12-07, Util.lua, version 8.1.0.28724, near line 628, archived at Townlong-Yak
  2. ^ 2016-07-19, Util.lua, version 7.0.3.22267, near line 621, archived at Townlong-Yak
Advertisement