WoW:XML/Color elements: Difference between revisions
< XML
Jump to navigation
Jump to search
(Complete revamp.) |
m (Move page script moved page XML/Color elements to XML/Color elements without leaving a redirect) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
"Color" elements are | "Color" elements are used in many object types. They can indeed be named "Color", but there are several additional possibilities: | ||
* Color | * Color | ||
* MinColor | * MinColor | ||
Line 17: | Line 17: | ||
* g is green | * g is green | ||
* b is blue | * b is blue | ||
* a is alpha (transparency - 0.00 is completely | * a is alpha (transparency - 0.00 is completely transparent and 1.00 is completely opaque) | ||
== Details == | == Details == | ||
The Color element when used in a Texture element is | The Color element when used in a Texture element is applied only to an area with a solid block of color (with transparency). With other elements it can be used to change the color of the objects the element contains (such as the text in a fontstring). If you define file="" in the texture tag however Color will have no effect. You will have to use texturename:SetVertexColor() | ||
[[Category:Interface | |||
== Example == | |||
<Layer level="BACKGROUND"> | |||
<Texture name="$parent_TextureName"> | |||
<Color r="1.0" g="1.0" b="1.0" a="1.0"/> | |||
</Texture> | |||
</Layer> | |||
[[Category:Interface customization]] |
Latest revision as of 04:49, 15 August 2023
"Color" elements are used in many object types. They can indeed be named "Color", but there are several additional possibilities:
- Color
- MinColor
- MaxColor
- BarColor
- HighlightColor
- FogColor
The primary use however is in "Texture", which in turn gets used in many places.
Attributes[edit]
Attributes: r="#" g="#" b="#" a="#"
- "#" is a value from 0.00 to 1.00
- r is red
- g is green
- b is blue
- a is alpha (transparency - 0.00 is completely transparent and 1.00 is completely opaque)
Details[edit]
The Color element when used in a Texture element is applied only to an area with a solid block of color (with transparency). With other elements it can be used to change the color of the objects the element contains (such as the text in a fontstring). If you define file="" in the texture tag however Color will have no effect. You will have to use texturename:SetVertexColor()
Example[edit]
<Layer level="BACKGROUND"> <Texture name="$parent_TextureName"> <Color r="1.0" g="1.0" b="1.0" a="1.0"/> </Texture> </Layer>