XML/Color

From Warcraft Wiki
< XML
Jump to navigation Jump to search

<Color> (child of <Texture>, <Font> and <Shadow>) sets color using RGB values or a ColorMixin, and alpha. This tag is also inherited by <MinColor>, <MaxColor>, <BarColor>, <HighlightColor>, and <FogColor>.

<Color r="" g="" b="" a="" />
<Color color="" a="" />

Attributes

r (xs:float?Optional. Could be nil.) - Red component from 0.0 (default) to 1.0.
g (xs:float?Optional. Could be nil.) - Green component from 0.0 (default) to 1.0.
b (xs:float?Optional. Could be nil.) - Blue component from 0.0 (default) to 1.0.
a (xs:float?Optional. Could be nil.) - Alpha (opacity) from 0.0 to 1.0 (default).
name (xs:string?Optional. Could be nil.) - Name of a ColorMixin made with CreateColor().[1]

Details

  • Setting both rgb and color will result in an error; but alpha may be used with each.

Example

<Layer level="BACKGROUND">
    <Texture name="$parent_TextureName">
         <Color r="1.0" g="1.0" b="1.0" a="1.0"/>
    </Texture>
</Layer>

References

 
  1. ^ SharedColorConstants.lua, archived at Townlong-Yak