View Single Post
  #9  
Unread 05-22-2014, 07:08 AM
Digpoe Digpoe is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: May 2014
Posts: 7
This snippet of code should work to write a message to the chat in a specified color:

Code:
function WriteTextColor(color, text)
Turbine.Chat.WriteLine(string.format("<rgb=%s>%s</rgb>", color, text))
end

-- Usage:
WriteTextColor("#FFFFFF", "Hello, world!")
-- Make sure to provide the first argument as a hex string representing the color
EDIT: Whoops, didn't notice that you said 'channel' - I was thinking chat in general then. :P
__________________
Some kiddo who knows Lua
Reply With Quote