WoW:API ChangeChatColor

From AddOn Studio
Revision as of 04:53, 4 January 2006 by WoWWiki>Muert
Jump to navigation Jump to search
ChangeChatColor -Documentation by Farmbuyer-
ChangeChatColor("channelname", red, green, blue);

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.

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.
red, blue, green
Number - RGB values (as stored in chat-cache.txt divided by 255).

Returns
unknown
nil

Current calls in Blizzard files make no use of a return function.


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

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

See also FontString:SetTextColor().



Template:WoW API