The thing with LuaTexts is you sort of have to combine a few WoW secrets to get the most out of them. :) For example, in order to display coloured text, you need to use an escape sequence:
"|caarrggbb<text to be coloured>|r"
An example of the string "Howdie" in blue would look like this:
Your coloured Power text will look something like:
[php]local max = MaxPower(unit)
local cur = Power(unit)
if max > 0 then
local _, types = UnitPowerType(unit)
local r, g, b = PowerColor(types)
return "|cff%02x%02x%02x%s|r", r, g, b, cur
EDIT: I forgot to add that the return from each LuaText is fed through Lua's string.format function, so all of the standard formatting patterns apply, which is how we get the colours from PowerColor() into the right format for the escape sequence.