• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Can't export SVGs to have a fill="#000000" (black)

New Here ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

I'm having trouble exporting SVGs to have a black fill (fill="#000000). I am able to export an SVg to have any other color except a black one. I am exporting as Format: SVG using artboards (1). I am using SVG options:

Styling: Inline Style

Font: SVG

Image: Preserve

Object IDs: Layer Names

Decimal: 5

Minify: checked

Responsive: checked

(as screenshoted below)

Davy5F96_2-1619195214128.png

And the results in VS Code as shown below (no fill in code):

Davy5F96_3-1619195547286.png

And results of exporting in same settings with any other color:

Davy5F96_5-1619195671170.pngDavy5F96_4-1619195638491.png

Any reason why it won't export with a black fill?

TOPICS
Bug , Feature request , Import and export

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Can you post the appearance panel of the original file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Sure thing! Here's the appearance panel

DavyMJones_0-1619199994228.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 24, 2021 Apr 24, 2021

Copy link to clipboard

Copied

OK, that's weird.

Before resetting the preferences ... can you check the color management settings?

And also: which color profile is attached to the document? It's unlikely, but possible that color management does this. But those color profiles are experimental ones.

 

If color management is set up correctly, then can you try if "Export for screens" does the same? You have crrently used "Save as", right?

 

If that doesn't work, then probably the preferences are causing it. You can try and rename the folder, so it can be reverted. https://helpx.adobe.com/illustrator/using/setting-preferences.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

I'm having the same issue as @DavyMJones , in case it's helpful to know that this isn't an isolated case @Monika Gause!  True black refuses to be registered as a fill on export (using either 'Export as..' or 'Export for Screens...').  

Here's a screengrab of the proposed code generated by a simple set of shapes and paths on my machine, without any fill styling in the SVG code output for either of the #000 filled shapes (you can see the fill is present for the non-black shape):

Josiah5C26_1-1620688159992.png

 

The color profile isn't anything odd (I think):

Josiah5C26_0-1620688137157.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

And again: which color profile is attached to the file?

What's in the appearance panel?

How do you export the file?

 

And yes: yours are isolated cases.

 

Did you already reset the preferences? You can try by renaming the folder. https://helpx.adobe.com/illustrator/using/setting-preferences.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

Sorry. As Ton mentioned, black seems to never be defined in a fill.

I somehow got diverted by the green shapes in both posts.

 

It looks like you cannot force Illustrator to create a black fill e.g. by applying the registration swatch or by applying a blend mode. So the only solution seems to be to report it as a bug to http://illustrator.uservoice.com 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

Thank you @Monika Gause (and @Ton Frederiks ) for the feedback!  In my specific case, I'm a software developer trying to find a way to reliable render SVG's exported from illustrator into a generated PDF, and for whatever reasons browsers are able to guess properly about a black fill, but the pdf library wasn't.  We were able to use an unrelated work around to show the images (rendering them in a browser canvas and then printing a png/jpg of the canvas to the PDF rather than trying to render an SVG itself in the pdf).  Thanks for the link to the bug report, though, I suppose it might be worth filling one out just in case it helps somebody else (including the OP) 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

So that PDF is meant for specific printing processes (or even ebook) that don't allow placed PDFs in them?

 

I don't quite understand that workaround of rendering an SVG and then exporting a JPG from a browser instead of exporting it directly from Illustrator.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 24, 2023 Dec 24, 2023

Copy link to clipboard

Copied

I'm experiencing the same issue repeatedly. How can I fix this precisely? Whenever I upload my logo as an SVG file on my website, it appears blank or grey. Any color I use besides black displays correctly. Strangely, the logo shrinks, and when I change the fill color, it maintains the same measurements.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 26, 2023 Dec 26, 2023

Copy link to clipboard

Copied

Hello @YJYJ,

Sorry to hear about your experience. Would you mind sharing more details, like the exact version of the OS/Illustrator, details about your workflow, and a sample file (https://adobe.ly/3TEP6Cd), so we can investigate this further?

 

Looking forward to hearing from you.

 

Thanks,

Anubhav

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 11, 2024 Apr 11, 2024

Copy link to clipboard

Copied

Hello @Anubhav Majumder I'm experiencing a similar issue. As a graphic designer, I'm encountering a problem where the color black (#000000) doesn't display correctly on the front end, despite being selected. The design is supposed to have color options. Other colors work fine, and my colleague doesn't seem to have the same issue. I've already attempted resetting the preferences, but the problem persists. Any suggestions for resolving this?

Keithlenne5FD6_0-1712879446434.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2024 Apr 12, 2024

Copy link to clipboard

Copied

LATEST

Please check out Ton's answer at the very bottom of this page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

It does not seem to matter for the display of the fill, but a black fill is not defined.

A black stroke is saved. And that is the behaviour since at least CS4.

Opening a file in Inkscape shows Paint is undefined for the black fill.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines