4

In the dark mode, we know that background of transparent images is black. Even though it is normal behaviour, reading texts in some pictures becomes very hard. For example, this is what I saw when I look at this question:

enter image description here

I can easily open image in new tab, but I wanted to know if there is easier way of doing this (other than switching to light mode)?

6
  • 5
    I don't think that's a fault of the dark theme, but of the image. Personally, I don't think graphs should have transparent background exactly for the reason of what's happened in said question; the labels on the axis are no longer easily readable. Text on a transparent background, when that text doesn't have some kind of border, is often problematic as you have no control over what the background colour the image is display on is.
    – Thom A
    Feb 17, 2021 at 13:15
  • @Larnu, I agree with you and I haven't blamed the dark theme for that
    – Tugay
    Feb 17, 2021 at 13:17
  • 3
    I think the easiest thing to do is to open said image in a new tab; most browser have an right click option of "View Image". Otherwise, ask the OP to not use transparent backgrounds and upload a new version of said image. (Or you could even do this yourself using a snipping tool of the image in the new tab.)
    – Thom A
    Feb 17, 2021 at 13:19
  • 1
    This issue was raised when dark mode was announced. There was a suggestion to make transparency be interpreted as white (it's a thing CSS can do AFAIK), but it was apparently never implemented. Mildly satisfying to know that dark mode is underdeveloped at least :p
    – Zoe is on strike Mod
    Feb 17, 2021 at 13:20
  • 3
    Honestly, I think this is exactly the way it should be handled. If you generate an image and you want the background to be white, then make the background white, not transparent. You can click the image to open it in a new tab without any effort, and images should be displayed as they are imo, since for some examples the transparency may be relevant. There's no need for an easier way to get it on a blank background than just clicking it.
    – Erik A
    Feb 17, 2021 at 13:24
  • 1
    This a known problem. From Dark Mode Beta - help us root out low-contrast and un-converted bits: bug Transparent images can become hard to read (Alex Telon, Rahul Wadhwani, Niyas Nazar, jcubic and gman).” Feb 17, 2021 at 17:36

1 Answer 1

9

You can use a custom stylesheet extension to set images in posts background colours to white:

.js-post-body img {
     background-color:white;
}

enter image description here

Not the answer you're looking for? Browse other questions tagged .