"Andy" == Andy Fitzsimon <andyfitz@...400...> writes:
[Looks like I’m a bit behind, but anyway... -JimC]
Andy> I guess convert all to display as rgb while screen ( using normal Andy> colour profile ) and then convert all to cmyk on export?
You have the right concept but the wrong colour space.
The lingua franca space should be CIELab. And that is probably also the best space to use in the PDFs.¹ (CIE’s LUV and the derived LogLuv spaces are also usable, but PDF has CIELab support, so that wins.)
The components in CIELab either should be either floats (fixed point when compiling on systems which lack hardware floating point) or should be scaled to 16-bit integers for all internal uses, including all math.
But yes, you convert everything to a common colour space (colour profiles tell you how) and do the math there.
-JimC
1] If the user supplies an output colour profile, you can convert the CIELab to that and use DeviceCMYK. (Or DeviceRGB if the output profile happens to specify that it is an RGB output profile.)