1. A computer program product, tangibly embodied on a computer-readable storage medium including instructions which, when executed, causes data processing apparatus to: receive an image; identify a set of protected colors within a source color space within the image, the protected colors being a subset of the colors in the source color space; specify a first color mapping that associates each color in the source color space with a tuple of mapped component values, each mapped component value being a value for a corresponding component in a destination color space, the destination color space having a range of permissible component values for each of a plurality of components of the destination color space, the first color mapping associating one or more protected colors with one or more mapped protected color component values that are outside the range of permissible values for the destination color space; determine an injective second color mapping that associates the tuples of mapped protected color component values with tuples of optimized modified mapped protected color component values, the tuples of optimized modified mapped protected color component values occupying a maximal volume subject to a constraint; construct a third color mapping that is a concatenation of the injective second color mapping with the first color mapping, the third color mapping being constructed such that under the third color mapping, each color in the set of protected colors is associated with a distinct optimal modified mapped protected color inside the destination color space; and apply the third color mapping to the image to generate a modified image, wherein no colors in the set of protected colors are clipped.