ColorMixin:GetRGBAAsBytes()

From Warcraft Wiki
Jump to navigation Jump to search
These functions are implemented in :GetRGBAAsBytes FrameXML/Util.lua.

Returns the properties of a ColorMixin, multiplied by 255.

r, g, b, a = color:GetRGBAAsBytes()
r, g, b = color:GetRGBAsBytes()

Returns

r, g, b
number - Scaled values between 0 and 255.
a
number?Optional. Could be nil. - Scaled value between 0 and 255, or 255 if it was undefined.

Patch changes

  • Legion Patch 7.3.0 (2017-08-29): Alpha now defaults to 255, no longer causing an error if it was undefined.[1]
  • Legion Patch 7.0.3 (2016-07-19): Added.[2]

See also

References

 
  1. ^ 2017-08-28, Util.lua, version 7.3.0.24920, near line 606, archived at Townlong-Yak
  2. ^ 2016-07-19, Util.lua, version 7.0.3.22267, near line 621, archived at Townlong-Yak