- These functions are implemented in
FrameXML/Util.lua
.
- These functions are implemented in
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.
- a
- number? - 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[]
Patch 8.1.0 (2018-12-11): CreateColorFromBytes() and CreateColorFromHexString() added.[1]
Patch 7.0.3 (2016-07-19): CreateColor() added.[2]
External links[]
CreateColor()
GitHub FrameXML, Gethe
Globe "wut?" Tool, Townlong-Yak
CreateColorFromBytes()
GitHub FrameXML, Gethe
Globe "wut?" Tool, Townlong-Yak
CreateColorFromHexString()
GitHub FrameXML, Gethe
Globe "wut?" Tool, Townlong-Yak
References[]
- ^ 2018-12-07, Util.lua, version 8.1.0.28724, near line 628, archived at Townlong-Yak
- ^ 2016-07-19, Util.lua, version 7.0.3.22267, near line 621, archived at Townlong-Yak