WoW:API ChangeChatColor: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API ChangeChatColor to API ChangeChatColor without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>'''ChangeChatColor''' ''-Documentation by [[user:Farmbuyer|Farmbuyer]]-''</center>
{{wowapi}} __NOTOC__
 
Changes the text color of the specified chat channel.  The "color wheel" popup calls this function to do the actual work, once the user is done with the popup.
  ChangeChatColor("channelname", red, green, blue);
  ChangeChatColor("channelname", red, green, blue);


Changes the text color of the specified chat channel.  The "color wheel" popup
==Parameters==
calls this function to do the actual work, once the user is done with the popup.
===Arguments===
 
Note that the RGB values are fractions from 0 to 1.
 
----
;''Arguments''
 
:(String "channelname", Number red, Number blue, Number green)
:;channelname : String - Name of the channel as given in chat-cache.txt files.
:;channelname : String - Name of the channel as given in chat-cache.txt files.
:;red, blue, green : Number - RGB values (as stored in chat-cache.txt divided by 255).
:;red, blue, green : Number - RGB values (0-1, floats).
 
----
;''Returns''
 
:unknown
:;nil
 
Current calls in Blizzard files make no use of a return function.
 
----
;''Example''


==Example==
  ChangeChatColor("CHANNEL1", 255/255, 192/255, 192/255);
  ChangeChatColor("CHANNEL1", 255/255, 192/255, 192/255);
===Result===
Reset the General channel to the default (255,192,192, slightly off-white) color.


would reset the General channel to the default (255,192,192, slightly off-white) color.
==See Also==
 
* [[API FontString SetTextColor|FontString:SetTextColor()]].
See also [[API FontString SetTextColor|FontString:SetTextColor()]].
 
----
{{Template:WoW API}}

Latest revision as of 04:45, 15 August 2023

WoW API < ChangeChatColor

Changes the text color of the specified chat channel. The "color wheel" popup calls this function to do the actual work, once the user is done with the popup.

ChangeChatColor("channelname", red, green, blue);

Parameters[edit]

Arguments[edit]

channelname
String - Name of the channel as given in chat-cache.txt files.
red, blue, green
Number - RGB values (0-1, floats).

Example[edit]

ChangeChatColor("CHANNEL1", 255/255, 192/255, 192/255);

Result[edit]

Reset the General channel to the default (255,192,192, slightly off-white) color.

See Also[edit]