[metapost] CMYK colours in SVG output

Stephan Hennig mailing_list at arcor.de
Thu Jul 7 19:44:14 CEST 2011


Hi,

the following code uses a CMYK colour while generating SVG output.
MetaPost seems to be nice and silently convert that into an RGB colour.

outputformat := "svg";
beginfig(1);
  draw fullcircle withcmykcolor (.1,.2,.3,.4);
endfig;
end

To be honest, I'd expect MetaPost to error out on colouring objects with
colours from a colour model that isn't supported by the output format.
Isn't such use-case better be dealt with at the macro level than on the
engine level, i.e., by providing a macro that does the conversion?
Implicit conversion seems wrong to me.  Are the conversion rules
documented somewhere?  Can they be configured by the user?

Best regards,
Stephan Hennig


More information about the metapost mailing list