Skip to content

Commit

Permalink
πŸ’„ Make theming less strict (#59)
Browse files Browse the repository at this point in the history
There were a few cases where the browser theme color was way too light (e.g. the xkcd website), but a darker color still had good enough contrast. This makes the theme requirements less strict
  • Loading branch information
trickypr authored Apr 15, 2024
1 parent 7f3e933 commit bda4e07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/content/src/browser/windowApi/WebsiteTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export function applyTheme(view, theme) {
}

const isLight = lightness > 50
const withinSpec = isLight ? lightness >= 75 : lightness <= 25
const withinSpec = isLight ? lightness >= 70 : lightness <= 30

if (!withinSpec) {
lightness = isLight ? 75 : 25
lightness = isLight ? 70 : 30
if (chroma === 0) {
chroma = 0
} else {
Expand Down

0 comments on commit bda4e07

Please sign in to comment.