Image contrast is off in Dark Mode #1665

Closed
opened 2026-02-05 01:33:08 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @derklompi on GitHub (Apr 16, 2020).

Describe the bug
If you turn on dark mode the contast in uploaded images is quite off and for some images parts are not visible anymore

Steps To Reproduce
Steps to reproduce the behavior:

  1. Turn on Dark mode
  2. Open a page with an image

Expected behavior
I expect the image to be shown the same in dark and "normal" mode.

Screenshots
bookstackapp

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.29.0
  • PHP Version: 7.2.24
  • Hosting Method (Nginx/Apache/Docker): Apache 2.4.29
Originally created by @derklompi on GitHub (Apr 16, 2020). **Describe the bug** If you turn on dark mode the contast in uploaded images is quite off and for some images parts are not visible anymore **Steps To Reproduce** Steps to reproduce the behavior: 1. Turn on Dark mode 2. Open a page with an image **Expected behavior** I expect the image to be shown the same in dark and "normal" mode. **Screenshots** ![bookstackapp](https://user-images.githubusercontent.com/10167026/79453747-64e49c00-7fea-11ea-88d9-ab2058c589a2.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.29.0 - PHP Version: 7.2.24 - Hosting Method (Nginx/Apache/Docker): Apache 2.4.29
OVERLORD added the 🐛 Bug🎨 Design labels 2026-02-05 01:33:08 +03:00
Author
Owner

@aalbul commented on GitHub (May 26, 2020):

+1. Have the same issue. I love dark mode, but this makes it almost unusable for me :(

@aalbul commented on GitHub (May 26, 2020): +1. Have the same issue. I love dark mode, but this makes it almost unusable for me :(
Author
Owner

@maderschramm commented on GitHub (Jun 11, 2020):

Same issue here

@maderschramm commented on GitHub (Jun 11, 2020): Same issue here
Author
Owner

@abulgatz commented on GitHub (Jun 24, 2020):

Looks like it's the a tag dark-mode styling affecting images inside links.

html.dark-mode a {
    filter: brightness(1.3) saturate(0.7);
}
@abulgatz commented on GitHub (Jun 24, 2020): Looks like it's the a tag dark-mode styling affecting images inside links. ``` html.dark-mode a { filter: brightness(1.3) saturate(0.7); } ```
Author
Owner

@JessicaMulein commented on GitHub (Jul 17, 2020):

I ran into this as well. It trashes the color of book/shelf/app images.

@JessicaMulein commented on GitHub (Jul 17, 2020): I ran into this as well. It trashes the color of book/shelf/app images.
Author
Owner

@ssddanbrown commented on GitHub (Jul 26, 2020):

Thanks for confirming everyone, For v0.30 I've updated the dark mode styles to not affect images. Until that's release you should be able to add the following to your "Custom HTML Head Content" setting to work-around for now:

html.dark-mode body a {
    filter: none;
}

The styles causing this were down to attempting a brightening of links for dark mode use, which will now be left as the default app theme color. If found to be an issue (Links are commonly too dark), we'll have to look at other solutions for that instead.

@ssddanbrown commented on GitHub (Jul 26, 2020): Thanks for confirming everyone, For v0.30 I've updated the dark mode styles to not affect images. Until that's release you should be able to add the following to your "Custom HTML Head Content" setting to work-around for now: ```html html.dark-mode body a { filter: none; } ``` The styles causing this were down to attempting a brightening of links for dark mode use, which will now be left as the default app theme color. If found to be an issue (Links are commonly too dark), we'll have to look at other solutions for that instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1665