Skip to main content
Participant
September 2, 2021
Question

Illustrator exported SVG file not showing color code #00000 in text editor

  • September 2, 2021
  • 2 replies
  • 4347 views

Hello Guys i have a issue in illustrator for creating SVG. I want to export SVG with #000000 colour code as a fill colour but the export SVG i cant get it.

 

If anyone have a solution please give me a help.

 

{Renamed by MOD}

This topic has been closed for replies.

2 replies

Anshul_Saini
Community Manager
Community Manager
September 2, 2021

Hi there,

 

Sorry to hear about your trouble. I would like to know if the steps suggested above by @Myra Ferguson worked for you?

I checked your file in Illustrator, and it is showing the #000000 color code. I have re-exported your file. Please check it out (https://shared-assets.adobe.com/link/a1e81bfc-587e-446b-6575-a475eb5b6187). Also, please try any different browser (e.g., Mozilla Firefox). 


Note: It's best to work in RGB mode (with an sRGB color profile) when content is created for the web or viewed on the web.

 

Kindly update the discussion if you still need assistance with it. We'd be happy to help.

 

Thanks & Regards,

Anshul Saini

Participant
September 2, 2021

hello Anshul,

I issue not in illustrator. the issue on however I export the SVG from
Illustrator and open it through a text editor. please check I attach the
two images with #000000 color and #212121 with screenshots.

The #212121 colure SVG source export with the fill color.

Rectangle 1 = #000000
Rectangle 2 = #212121

I already underline the #2121221 fill color but in #000000 Rectangle I
don't see it.

--
[image: 2]
Sachintha Keddagodage
(Personal Details removed by Mod)

Anshul_Saini
Community Manager
Community Manager
September 23, 2021

Thank you for confirming that, and sorry for the delayed response. I confirmed this with the product team, and this is what they said "In SVG, (just like in HTML) every CSS property has a fallback value if not set. When exporting, we try to reduce the size of the SVG file as much as possible. One part of this is not exporting any attribute/CSS property that would be set to the default of the attribute/properties in question. The default for fill is black. So we do not explicitly write black (or #000000) to the SVG file."

 

I hope this clarifies.

 

Regards,

Anshul Saini

Myra Ferguson
Community Expert
Community Expert
September 2, 2021

I'm guessing that the Document Color Mode for your Illustrator file is set to CMYK instead of RGB. Go to File > Document Color Mode > RGB Color to set it. Then re-export your selection.