Page MenuHomePhabricator

Image hue is inverted in dark mode
Closed, ResolvedPublic

Assigned To
Authored By
Chellewalker1
Aug 30 2025, 1:24 PM
Referenced Files
F65935331: image.png
Aug 30 2025, 1:24 PM
F65935328: image.png
Aug 30 2025, 1:24 PM
F65935347: image.png
Aug 30 2025, 1:24 PM
F65935344: image.png
Aug 30 2025, 1:24 PM

Description

I manage the wiki swse.miraheze.org, and have been having issues with how dark mode applies to images. By default, the DarkMode extension is rotating their hue when in Dark Mode, which is an effect I want to cancel. However, applying the .mw-no-invert class has had no effect, and applying the filter: invert( 1 ) hue-rotate( 180deg ) does not have the desired effect. Is there some method to exclude images from the initial hue rotation that the DarkMode extension applies?

The normal appearance of an image

image.png (1×1 px, 609 KB)

The image in Dark Mode

image.png (1×1 px, 598 KB)

Image in default when attempting to apply the hue-rotate

image.png (1×1 px, 579 KB)

Image in dark mode when attempting to apply the hue-rotate

image.png (1×1 px, 600 KB)

Event Timeline

Restricted Application added subscribers: Reception123, Aklapper. · View Herald Transcript

AFAIK there is no fix for this. Your best bet is to disable this extension and write your own dark mode CSS. You can also use the Theme or ThemeToggle extensions to allow switching between multiple themes.

Redmin renamed this task from Image coloration can't be corrected to Image hue is inverted in dark mode.Aug 31 2025, 10:40 AM
Redmin claimed this task.

Change #1183254 had a related patch set uploaded (by R4356thwiki; author: R4356thwiki):

[mediawiki/extensions/DarkMode@master] Make .mw-no-invert and images immune to hue inversion again

https://gerrit.wikimedia.org/r/1183254

Change #1183254 merged by jenkins-bot:

[mediawiki/extensions/DarkMode@master] Make .mw-no-invert and images immune to hue inversion again

https://gerrit.wikimedia.org/r/1183254

Change #1197652 had a related patch set uploaded (by R4356thwiki; author: R4356thwiki):

[mediawiki/extensions/DarkMode@REL1_44] Make .mw-no-invert and images immune to hue inversion again

https://gerrit.wikimedia.org/r/1197652

Change #1197653 had a related patch set uploaded (by R4356thwiki; author: R4356thwiki):

[mediawiki/extensions/DarkMode@REL1_43] Make .mw-no-invert and images immune to hue inversion again

https://gerrit.wikimedia.org/r/1197653

Change #1197652 merged by jenkins-bot:

[mediawiki/extensions/DarkMode@REL1_44] Make .mw-no-invert and images immune to hue inversion again

https://gerrit.wikimedia.org/r/1197652

Change #1197653 merged by jenkins-bot:

[mediawiki/extensions/DarkMode@REL1_43] Make .mw-no-invert and images immune to hue inversion again

https://gerrit.wikimedia.org/r/1197653