WoW:XML/Color

From AddOn Studio
< XML
Revision as of 04:49, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page XML/Color to XML/Color without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

XML UI ← XML types < Color

Color defines a visible color. Attribute values are in range from 0.0 to 1.0.

Inheritance

Inherited by: none, Inherits: none, Defined in: multiple

Elements

none

Attributes

  • r (float) - red, 0..1. default is 0.0
  • g (float) - green, 0..1. default is 0.0
  • b (float) - blue, 0..1. default is 0.0
  • a (float) - alpha, 0..1. Optional, default is '1.0'.
  • color (string) - text name of a predefined ColorMixin color item

Summary

Values outside the range of 1..0 will be clamped to 1..0. Assumes either 'r', 'g' and 'b' are set, or 'color' is set. Alpha can be set or not set for either case. The 'color' text name references a Lua ColorMixin color item in the global table.

Example

<Frame name="MyFrame">
  <Layers>
    <Layer>
      <Texture>
        <Size x="100" y="100" />
        <Color a="1" r="1" g="1" b="1" />
      </Texture>
    </Layer>
  </Layers>
</Frame>

This example will show a opaque color texture, painted white.

History

  • 'color' attribute added 8.2.5