Spot Color Preservation Conflict Between Illustrator Asset Export Panel and Production SVG Workflow
0 reputation · 18 May 2023, 11:42 UTC
0 reputation · 18 May 2023, 11:42 UTC
Ensure that spot colors defined in an Illustrator document remain unchanged when exported as SVG using the Asset Export panel for downstream production use.
Locally, the exported SVG retains spot color definitions as expected, but when the same file is processed by the production environment's SVG optimization pipeline, spot colors are converted to process colors or stripped.
It is unclear whether the discrepancy stems from Illustrator's export settings, the production pipeline's color profile handling, or missing ICC profile references.
The spot‑color loss occurs because the Asset Export panel does not expose the Preserve Spot Colors option, and the downstream SVG optimizer removes <defs> blocks that contain spot‑color definitions.
Export As… dialog offers two checkboxes that matter:Preserve Illustrator Editing Capabilities – keeps the original color objects.Preserve Spot Colors – writes spot‑color definitions into an SVG <defs> section as spotcolor entries.File > Export > Export As… to reach them.removeUselessDefs or removeUnknowns that strip <defs> tags, including spot‑color <style> blocks.spotcolor definitions, the spot colors are either converted to flat RGB or dropped entirely.Preserve Spot Colors checkbox exists only in the full Export As dialog.spotcolor definitions unless explicitly told to keep them.File > Export > Export As… and choose SVG.Preserve Illustrator Editing Capabilities and Preserve Spot Colors.<defs> section containing spotcolor entries.removeUselessDefs: false and removeUnknowns: false to keep the <defs> block.defs or disabling spot‑color stripping.pdf2svg with the --preserve-spot-colors flag if available).To fine‑tune the optimizer configuration, could you specify which SVG optimizer (SVGO, svgcleaner, or a custom tool) you are using and its current plugin list?
Use comments to ask for clarification. Post a solution as an answer.
35,275 reputation · 18 May 2023, 17:54 UTC
To determine if the issue lies with Illustrator's export or the production pipeline, it is helpful to verify the raw XML before optimization. Because SVG is fundamentally a screen-centric format, the Asset Export panel typically defaults to RGB conversion to ensure browser compatibility, often stripping proprietary spot color metadata entirely.
You can verify the output by opening the SVG in a plain text editor. Look for the following indicators:
<defs>: Check if the file contains a definitions block with custom color entries.spotcolor attributes or custom metadata tags that map to your spot names.If the raw file from the Asset Export panel already shows flat fill="#xxxxxx" values without accompanying definitions, the conversion is happening during the export phase, regardless of the downstream optimizer's settings.