map color to palette