Skip to content

Commit 631ee6c

Browse files
authored
Infra: Only invert image brightness, not hue (#2949)
Since inversion doesn’t just affect brightness, but also hue, there’s a problem: Some background colors have perceptually less contrast with their text when hue rotated. This rotates their hue back, fixing the contrast issue.
1 parent 32c692b commit 631ee6c

File tree

1 file changed

+1
-1
lines changed
  • pep_sphinx_extensions/pep_theme/static

1 file changed

+1
-1
lines changed

pep_sphinx_extensions/pep_theme/static/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454

5555
img.invert-in-dark-mode {
56-
filter: var(--dark, invert(1));
56+
filter: var(--dark, invert(1) hue-rotate(.5turn));
5757
}
5858

5959
/* Set master rules */

0 commit comments

Comments
 (0)