Skip to main content
Participant
November 13, 2018
Question

HEX Colors change when saving out a vector .svg in AI

  • November 13, 2018
  • 2 replies
  • 1337 views

[Moderator moved from Adobe Creative Cloud to Illustrator.]

When I save out a vector shape file in AI as a .svg file, the HEX color changes when I reopen the file. Its not a big change but enough that its not matching the correct allocated HEX color. Why is Illustrator not maintaining the correct color? Additionally, when I share the .svg with the dev's on the team they also get a different color when they open the file. How can I make sure the correct selected HEX color is locked and doesn't change? I have tried every trick I can find online and nothing is working. Help!

This topic has been closed for replies.

2 replies

Mike_Gondek10189183
Community Expert
Community Expert
May 16, 2022

File >> Document Color  Mode >> RGB

 

After that enter your hex color and it will stick, even when saving to svg.

 

Legend
November 13, 2018

Is it perhaps a document in CMYK mode?

Participating Frequently
May 16, 2022

I have alwas the same issue. Whart I do is I'm correcting manually all the hex color codes in outputed svg file, but this is a nightmare. Things are getting complicated when there is a gradient applied.

This the only way I was able to fix this issue. 

Switching between RGB and CMYK is not helping at all.  

Brad @ Roaring Mouse
Community Expert
Community Expert
May 16, 2022

You cannot use HEX codes in a CMYK document. Hex codes are RGB colour values. Even if you enter one, if your document is CMYK, the colour will be converted to the closest possible CMYK colour, which will then return a new RGB (Hex) value which is the closest to reproduce that CMYK colour on the screen... all based on your color management settings. Even if you originally started your document in RGB mode, if at any point you switched it to CMYK and then back to RGB, your colours will have changed.