Fix rounding errors in two colormap implementations