Forum Feature requests

Global Color Replacement

yiqiu
During post production, we sometimes need to adjust CMYK color values for different print vendors, ink or paper.

We are looking to see if there is any way to replace one color with another globally with PrinceXML.

- Yiqiu

Oracle UGBU Opower
mikeday
You can specify an output intent ICC color profile and convert colors to that profile with the --convert-colors option, would that work for you?
pjrm
For colors that won't reliably convert using ICC color profiles (such as if you don't have color profiles for one or more device, or when you care about proportion of K vs C+M+Y due to registration issues), custom properties might do the trick: have a series of printer1.css, printer2.css etc. stylesheets, each of which has
:root { --turquoise: device-cmyk(...); --mauve: ...; }
and run prince with either “-s printer1.css” or “-s printer2.css” as appropriate.
yiqiu
Thanks @mikeday and @pjrm for the the suggestion.

We are exploring ICC profiles, but it usually means the entire color colorspace is mapped, not just a couple of colors.

For the css custom properties, it seems we will have to modify all existing usage of a color into css properties to be able to take advantage of it.

We are looking more like something similar to `prince-text-replace`, but for color.
mikeday
Applying a regular expression to the document like s/red/blue/ is one such way! :D