WoW:USERAPI RGBPercToHex

From AddOn Studio
Revision as of 23:11, 11 February 2007 by WoWWiki>Tekkub
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page documents a <i>user-defined function</i> that you can copy and paste into your addon. Replace PREFIX with your addon or lib prefix to avoid conflicts between different versions of these functions.

User defined functions


Takes a RGB percent set (0.0-1.0) and converts it to a hex string.

local function RGBPercToHex(r, g, b)
	return string.format("%02x%02x%02x", r*255, g*255, b*255)
end