WoW:XML/Color: Difference between revisions

From AddOn Studio
< XML
Jump to navigation Jump to search
(Created page with "{{uixml}} Color defines a visible color. Attribute values are in range from 0.0 to 1.0. == Inheritance == Inherited by: none, Inherits: none, Defined in: multi...")
 
m (Move page script moved page XML/Color to XML/Color without leaving a redirect)
 
(One intermediate revision by one other user not shown)
(No difference)

Latest revision as of 04:49, 15 August 2023

XML UI ← XML types < Color

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

Inheritance[edit]

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

Elements[edit]

none

Attributes[edit]

  • 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[edit]

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[edit]

<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[edit]

  • 'color' attribute added 8.2.5