Basic palette to HTML encoding... Almost there :)