WoW:API FontString SetTextColor: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API FontString SetTextColor to API FontString SetTextColor without leaving a redirect)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<i>FontString</i>:SetTextColor(red,green,blue);
{{widgetmethod}}
Set the color of the text.


Sets the text color for any FontString UI object.
someText:SetTextColor(red,green,blue,alpha)


----
== Parameters ==
;''Arguments''
=== Arguments ===
:'''red''' Range 0 to 1
<!-- List each argument, together with its type -->
:'''green''' Range 0 to 1
:(red, green, blue, alpha)
:'''blue''' 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 ===
;''Example''
Nothing.
:<nowiki>String:SetTextColor(1.0,0,0);</nowiki>
 
: This will set the text color to be used with SetText() or any other output function.
== Example ==
string:SetTextColor(1, 1, 1, 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.
 
__NOTOC__

Latest revision as of 04:45, 15 August 2023

Widget API ← FontString < SetTextColor

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, 1, 1, 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.