Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Background color when viewing SVG not consistent with theme

  • No replies
  • 0 have this problem
  • 5 views
more options

I'm already using a dark theme and dark color definitions, and whenever I directly view other image files (such as GIF, JPEG, PNG, or WEBP, or even MP4 or WEBM videos), the surrounding background area is a dark gray in accordance with the theme.

However, when I directly view any SVG, the surrounding background area is a bright white instead.  I thought it was pure white but, upon using a color inspector, it's actually #f6f5f4. Strangely, a similar problem happens with Chromium, Chrome, and Edge but the background area with them is actually pure white #ffffff.

I did find the below userChrome.ccs code and tried adding "|svg" to the list of extensions, but this did not change anything.

@-moz-document regexp("((.*\\.(png|apng|jpg|jpeg|gif|tiff|bmp|svg))|(^data:image\\/.*))(\\?([^#]*))?(#(.*))?") { html > body { background-color: #353535 !important; } html > body > img:only-child { background-color:#666 !important; box-shadow: none !important; margin: 0 !important; } }

The SVG's don't have any background color defined.  I tried searching around for "f6f5f4" since that's a pretty specific value, but I guess it's used more than I thought, and I didn't initially find any connections.

How could I adjust this bright white #f6f5f4 to some other color? Thanks

I'm already using a dark theme and dark color definitions, and whenever I directly view other image files (such as GIF, JPEG, PNG, or WEBP, or even MP4 or WEBM videos), the surrounding background area is a dark gray in accordance with the theme. However, when I directly view any SVG, the surrounding background area is a bright white instead.  I thought it was pure white but, upon using a color inspector, it's actually #f6f5f4. Strangely, a similar problem happens with Chromium, Chrome, and Edge but the background area with them is actually pure white #ffffff. I did find the below userChrome.ccs code and tried adding "|svg" to the list of extensions, but this did not change anything. @-moz-document regexp("((.*\\.(png|apng|jpg|jpeg|gif|tiff|bmp|svg))|(^data:image\\/.*))(\\?([^#]*))?(#(.*))?") { html > body { background-color: #353535 !important; } html > body > img:only-child { background-color:#666 !important; box-shadow: none !important; margin: 0 !important; } } The SVG's don't have any background color defined.  I tried searching around for "f6f5f4" since that's a pretty specific value, but I guess it's used more than I thought, and I didn't initially find any connections. How could I adjust this bright white #f6f5f4 to some other color? Thanks