1

I have an existing svg (note: version 1) with colors defined in the RGB colorspace, like this fill="#e6dfd9".

This svg should be used in a printable PDF, for which I'm currently using TCPDF. What would be the best approach to take to convert the svg to cmyk to be print-ready?

Couldn't find a solution using TCPDF for this, so thinking about using Imagemagick to convert the SVG first to cmyk, than use TCPDF to convert to PDF.

Already tried:

  • Using this syntax inside the SVG, which states both a rgb and cmyk color: rgb(255,0,255) device-cmyk(0.03, 0.90, 0.80, 0.00). Colors aren't rendered correctly, this might be due to the svg version.
Bert H
  • 1,087
  • 1
  • 15
  • 29

2 Answers2

2

Conclusion of the research for now:

SVG 1.0 is meant for screen display and should not contain cmyk colors, but solely RGB. For later SVG versions (1.1 or 2), icc color profiles or device-cmyk can solve this by containing both an rgb and cmyk value.

In this case I've had to stick with SVG 1.0 so the color convertion should be done when preparing for print. This means the final colors will depend on the used color profile.

Thanks anyone helping me out during my research!

Bert H
  • 1,087
  • 1
  • 15
  • 29
1

Since SVG is basically an text file (more correct XML file) you could just replace the corresponding strings in this file.

Usage of CMYK in SVGs see: SVG image with CMYK colours - is it possible?

Lars-Olof Kreim
  • 280
  • 1
  • 8