svg shows up gray color

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DexterFstone

I import my SVG file to Godot, now it shows the gray color and not my real color
how to fix that?

Can you upload the SVG file somewhere and link it here?

It’s possible that the SVG relies on Inkscape-specific functionality, which SVG loaders like nanosvg can’t replicate. (nanosvg is the library currently used by Godot to import SVG images.)

Calinou | 2021-10-15 14:05

Hi again
in the first time, I use Adobe Illustrator SVG and it is black then I just export pdf then converted it to SVG with the online tool now it just shows gray color

DexterFstone | 2021-10-15 18:58

It says the file was deleted. Converting to PDF as an in-between step sounds a bit convoluted. It should work directly.

skysphr | 2021-10-15 23:00

here on my google drive

DexterFstone | 2021-10-16 06:03

Resaving with Inkscape did the trick, but I had to select the object and ungroup (any other operations would probably work too) so that Inkscape reevaluates the data.

skysphr | 2021-10-16 14:19

I am not very good at english. Can you tell me what I should do now to solve this problem? Step by Step

DexterFstone | 2021-10-16 14:56

  1. Install Inkscape if you don’t have it already
  2. Open your SVG
  3. Click the image to select it
  4. Object > Ungroup (or Shift+Ctrl+G)
  5. Save SVG
  6. Load in Godot and enjoy the colours

skysphr | 2021-10-17 01:17

tnx it is work

DexterFstone | 2021-10-17 09:07

Godot seems doesn’t support the alpha channel for SVG it is just true or false

DexterFstone | 2021-10-18 07:59

Alpha channel import works fine for me. It could be Illustrator exporting weird SVGs.

skysphr | 2021-10-19 20:04