fixed palette-to-color conversion