Fixed conversion of color to palette color mode.