/trunk
function ChatEdit.ColorText(text, r, g, b, id) |
local color = "|c"..format("FF%.2X%.2X%.2X", (r or 1) * 255, (g or 1) * 255, (b or 1) * 255); |
text = gsub(text, "|r", color) |
local colorPrefix = format("[%.2f,%.2f,%.2f,%s]", r, g, b, id or "") |
text = colorPrefix..color..text.."|r" |
--local colorPrefix = format("[%.2f,%.2f,%.2f,%s]", r, g, b, id or "") |
--text = colorPrefix..color..text.."|r" |
text = color..text.."|r" |
return text |
end |
## Notes: Select and copy chat directly from the frame and still click through it. |
## Notes-deDE: Erlaubt es Text aus dem Chatfenster direkt zu kopieren. |
## Author: AnduinLothar |
## Version: 3.0 |
## X-Date: Jan 12 2010 |
## Version: 3.1 |
## X-Date: 2011-12-01 |
## X-Category: Chat |
## X-Website: http://www.wowinterface.com/downloads/info5438-ChatEdit.html |
## X-CompatibleLocales: enUS, enGB, deDE, frFR, koKR, zhCN, zhTW, esES |