WoW:API FontString SetTextColor: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<i>FontString</i>:SetTextColor(red,green,blue[,alpha]);
<center>'''FontString:SetTextColor''' ''-Documentation by [[user:Author|Author]]-''</center>


Sets the text color for any FontString UI object.
Set the color of the text.


----
someText:SetTextColor(red,green,blue,alpha)
;''Arguments''
 
:'''red''' Range 0 to 1
== Parameters ==
:'''green''' Range 0 to 1
=== Arguments ===
:'''blue''' Range 0 to 1
<!-- List each argument, together with its type -->
;''Optional Argument''
:(red, green, blue, alpha)
:'''alpha''' Range 0 to 1
 
----
:;red : Number - Range 0 to 1
;''Returns''
:;green : Number - Range 0 to 1
:<i>nil</i>
:;blue : Number - Range 0 to 1
:;alpha : Number - Range 0 to 1.  Optional.
 
=== Returns ===
Nothing.
 
== Example ==
string:SetTextColor(1.0, 0,0, 0.5)
 
====Result====
This will set the text color to be used with SetText() or any other output function. In this the text will be semi transparent red.


----
----
;''Example''
__NOTOC__
:<nowiki>String:SetTextColor(1.0,0,0,0.5);</nowiki>
{{Template:WoW API}}
: This will set the text color to be used with SetText() or any other output function. In this the text will be semi transparent red.
 
{{template:WoW API}}

Revision as of 20:24, 14 January 2006

FontString:SetTextColor -Documentation by Author-

Set the color of the text.

someText:SetTextColor(red,green,blue,alpha)

Parameters

Arguments

(red, green, blue, alpha)
red
Number - Range 0 to 1
green
Number - Range 0 to 1
blue
Number - Range 0 to 1
alpha
Number - Range 0 to 1. Optional.

Returns

Nothing.

Example

string:SetTextColor(1.0, 0,0, 0.5)

Result

This will set the text color to be used with SetText() or any other output function. In this the text will be semi transparent red.


Template:WoW API