As lightspark suggested, use the ClassPower element and add this PostUpdate callback:
Lua Code:
local function PostUpdateClassPower(element, cur, max, hasMaxChanged, powerType)
if(powerType == 'SOUL_SHARDS') then
for i = 1, max do
if(i <= cur) then
-- purple
else
-- green
end
end
end
end