Skip to content

fix(colours): chrome legibility audit — tab titles, findbar, address bar, unfocused window, and the downloads panel - #211

Merged
AdamXweb merged 8 commits into
AdamXweb:masterfrom
adamXbot:fix/chrome-legibility
Aug 21, 2026
Merged

fix(colours): chrome legibility audit — tab titles, findbar, address bar, unfocused window, and the downloads panel#211
AdamXweb merged 8 commits into
AdamXweb:masterfrom
adamXbot:fix/chrome-legibility

Conversation

@adamXbot

Copy link
Copy Markdown
Contributor

Measured every visible text node in the chrome against its real background on Firefox 153, and separately ran the same window with an empty userChrome.css so any surface whose colour came back byte-identical is one the theme never touched. This is what that turned up, plus the downloads panel, which had no colour rules of its own.

All numbers are contrast ratios measured in the browser, with a dark palette (Monokai Pro / Nord) and the desktop in light mode — the case that exposes light-dark().

The recurring cause

Firefox declares colours on the descendant.tab-content from --tab-selected-textcolor, .checkbox-label in the findbar. An element's own declaration beats an inherited value whatever its origin or importance, so tab { color: … !important } never reached the label. Add light-dark() resolving against the system scheme while the palettes in custom/ are unconditional, and a dark palette on a light desktop rendered them near-black on dark.

The fix is always the token or the descendant, never the ancestor.

Fixed

before after
Selected tab title 1.1:1 13.8:1
Findbar checkbox labels 1.3:1 fixed
Address-bar match highlight 2.3:1 8.9:1
Panel secondary text 3.0:1 7.5:1
Unfocused tab titles (22 palettes) median 3.2:1, ten below 3:1 median 5.6:1, none below 3:1

Plus three variables that were used but never defined anywhere in the tree, so their declarations were dropped as invalid: --whitesur-button-hover-color and --whitesur-button-active-color (the findbar close button had no hover or press state at all) and --gnome-entry-border-color (a border that never drew).

And the surfaces the palette wasn't reaching: the address-bar results dropdown (#e0e0e6 row and a white "Search with Google" chip on a dark dropdown), and #browser / .browserContainer still holding #f9f9fb.

The downloads panel

parts/panels.css gives every arrow panel the popover surface, but none of the downloads panel's own furniture comes from the panel variables. The progress bar drew Firefox blue under every palette (paused drew GrayText, a system colour), and the blocked/insecure states are light-dark() pairs.

The blocked reds and ambers stay red and amber — that is the message — but are mixed toward --whitesur-ink so they follow the surface. The weights (55%, 45% under -i) come from computing WCAG ratios across all 22 palettes; the binding cases are Catppuccin Latte, whose ink is a soft slate rather than near-black, and Nord, the lightest of the dark surfaces.

How it was checked

Firefox 153.0.4, driven through Marionette, panels opened from chrome context and captured with OS-level screenshots — drawWindow cannot see an arrow panel. Every fix was measured before and after against the same session with the sheet removed.

Two cautions worth recording, both of which produced wrong answers before being caught:

  • A DOM audit that composites ancestor backgrounds is wrong wherever Firefox paints from a sibling — a tab's .tab-background sits beside the label's container, not above it. Two of four initial findings did not survive being cropped out of a real screenshot, and one real finding was under-reported (2.8:1 by DOM, 2.3:1 by pixels). Every number above is pixel-confirmed.
  • :-moz-window-inactive never matches while Marionette is attached, because the remote agent keeps Services.focus.activeWindow set. Anything focus-dependent has to be tested with a plain launch and --no-remote.

After these changes the audit reports no text below 4.5:1 and no unthemed surfaces (was five).

Not included

The -a highlight-tab option is a separate PR, since it is the only user-facing new flag here.

adamXbot and others added 8 commits August 18, 2026 14:02
The 'search with' heading on the engine list, the extensions panel's
'can't run here' message and the blocked-download explanation were all
painted --gnome-inactive-toolbar-color. Every palette sets that to 35%
ink because it means 'this window is not focused'; at that strength a
label measures about 3:1 on the popover, against the 8:1 Firefox gets
from --text-color-deemphasized. Measured on Firefox 153, the theme was
making those three labels harder to read than leaving them alone.

--whitesur-panel-secondary-text is 70% of the panel's own text colour,
which is what Firefox was doing. It needs no contrast-mode variant:
contrast-rules.css already promotes --gnome-toolbar-color to the full
--whitesur-ink, so it strengthens with everything else under -i.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
parts/panels.css gives every arrow panel the palette's popover surface,
but none of the downloads panel's own furniture is painted from the
panel variables:

  - The progress bar. --download-progress-fill-color falls back to
    --toolbarbutton-icon-fill-attention, which the theme never set, so a
    download in flight drew a Firefox-blue bar under every palette and a
    paused one drew GrayText -- a system colour that ignores the palette.
  - The blocked and insecure states, which are light-dark() pairs.
    light-dark() resolves against the system colour scheme while the
    palettes in custom/ are unconditional, so a dark palette on a light
    desktop got the light-mode red on a dark popover.
  - The summary strip along the bottom.

The blocked reds and ambers stay red and amber -- that is the whole
message -- but are mixed toward --whitesur-ink so they follow the
surface: 55% here, 45% under -i. The weights were chosen by computing
WCAG ratios across all 22 palettes; the binding cases are Catppuccin
Latte, whose ink is a soft slate, and Nord, the lightest dark surface.

Verified on Firefox 153 against the same session with this sheet
removed. Selectors and variables checked against mozilla-central and
mozilla-esr140; where the two disagree both spellings are set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This sheet sets colour on `tab`, which only reaches the label by
inheritance -- and Firefox declares a colour on .tab-content itself,
from --tab-selected-textcolor. An element's own declaration beats an
inherited value whatever its origin or importance, so the !important
here never applied to the selected tab's title.

The token is a light-dark() pair, rgb(21, 20, 26) / #ffffff, and the
palettes in custom/ are unconditional, so a dark palette on a light
desktop rendered the selected tab's title near-black on a dark tab.
Measured 1.1:1 on Firefox 153; 13.8:1 once the token is set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
parts/toolbox.css gives the findbar the palette's background but nothing
set a colour to go with it, so its labels kept Firefox's near-black:
'Highlight All', 'Match Case', 'Match Diacritics' and 'Whole Words'
measured 1.3:1 with a dark palette on a light desktop. The checkbox
labels need naming individually -- .checkbox-label carries its own
declaration, the same mechanism as the tab titles.

Separately, --whitesur-button-hover-color and
--whitesur-button-active-color were never defined anywhere in the tree;
these two rules were the only mentions of either name. An undefined
var() is invalid at computed-value time, so both declarations were
dropped and the close button had no hover or press state at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The row highlight, the separator and the chip inside the bar come from
--urlbarview-* and --urlbar-box-* on :root, every one a light-dark()
pair. With a dark palette on a light desktop that meant a #e0e0e6
selected row and a white 'Search with Google' chip on a dark dropdown.

Note the spelling: the colour tokens are --urlbarview-* with a lowercase
v, while the metrics beside them are --urlbarView-* with a capital one.
Custom properties are case-sensitive, so the two are unrelated names.
Read off Firefox 153 itself.

Also fixes --gnome-entry-border-color, used for the one-off search
separator and defined nowhere, so that border never drew.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two tokens the palettes never reached.

--link-color paints the matching substring in an address-bar result --
.urlbarView-row:not([selected]) & at view-proton.css:849, found with the
Browser Toolbox's own engine -- and 'Manage bookmarks...' on the empty
bookmarks toolbar. It defaults to --color-blue-60, which measured 2.3:1
against a dark palette's result row; 8.9:1 on the palette accent.

--toolbarbutton-icon-fill-attention is the attention dot on a toolbar
button, and what --download-progress-fill-color falls back to. Its
default is a blue no palette ever changed.

parts/panels.css already sets --link-color inside panels and
parts/in-content.css sets it for about: pages; this is the window, so
all three now agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#browser and .browserContainer were measured still holding Firefox's
#f9f9fb with a dark palette installed -- the same white flash this sheet
exists to remove, showing through a different element.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured across all 22 palettes on Firefox 153, the unfocused tab title
averaged 3.2:1 and fell below 3:1 in ten of them -- 1.78:1 in Catppuccin
Latte, 1.84:1 in the base light theme.

60% of the palette's ink is the first strength at which no palette falls
under 3:1 (median 5.6, min 3.3), and it is well clear of the ~11:1 the
same text has when focused, so the window still reads as inactive. It is
also what parts/contrast-rules.css already used for these two, so -i and
the default path now agree.

Only the tab titles are touched. The toolbar text is dimmed by
opacity: 0.7 in parts/toolbox.css rather than by a colour, and measures
a median 6.2:1 -- dimming an unfocused window is the point, making its
tab titles unreadable is not.

Imported after the palettes: they all declare these !important, so an
override earlier in theme.css would lose to whichever palette loaded
after it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Theme preview

Rendered from 394eff3 against the base branch.

Linux — 22 views changed

Customize mode (0.04% of pixels)

Find bar — light (0.14% of pixels)

Variant: increase-contrast (0.00% of pixels)

Variant: theme-ayu-mirage (0.10% of pixels)

Variant: theme-catppuccin-frappe (0.10% of pixels)

Variant: theme-catppuccin-latte (0.06% of pixels)

Variant: theme-catppuccin-macchiato (0.10% of pixels)

Variant: theme-catppuccin-mocha (0.11% of pixels)

Variant: theme-dracula (0.11% of pixels)

Variant: theme-everforest-dark (0.10% of pixels)

Variant: theme-github-dark (0.10% of pixels)

Variant: theme-gruvbox-dark (0.10% of pixels)

Variant: theme-material-ocean (0.10% of pixels)

Variant: theme-material-palenight (0.11% of pixels)

Variant: theme-monokai-pro (0.11% of pixels)

Variant: theme-night-owl (0.10% of pixels)

Variant: theme-nord (0.11% of pixels)

Variant: theme-one-dark (0.10% of pixels)

Variant: theme-rose-pine (0.10% of pixels)

Variant: theme-solarized-dark (0.09% of pixels)

Variant: theme-solarized-light (0.07% of pixels)

Variant: theme-tokyonight (0.10% of pixels)

macOS — 43 views changed

Browser window — dark (0.01% of pixels)

Tab playing audio (0.01% of pixels)

Tab muted (0.01% of pixels)

Container tabs (0.01% of pixels)

Tab strip overflowing (0.00% of pixels)

Compact density (0.00% of pixels)

Sidebar — bookmarks (0.00% of pixels)

Sidebar — history (0.00% of pixels)

Right-to-left UI (0.01% of pixels)

Customize mode (0.06% of pixels)

Vertical tabs (0.01% of pixels)

Customised toolbar (0.01% of pixels)

Browser window — light (0.01% of pixels)

Address bar focused — light (0.16% of pixels)

Find bar — light (0.18% of pixels)

Variant: compact-tabs (0.01% of pixels)

Variant: enabletabview (0.01% of pixels)

Variant: hideextension (0.01% of pixels)

Variant: noidentity (0.01% of pixels)

Variant: singletabhidden (0.01% of pixels)

Variant: standard-urlbar (0.01% of pixels)

Variant: tabs-swapclose (0.01% of pixels)

Variant: theme-ayu-mirage (0.08% of pixels)

Variant: theme-catppuccin-frappe (0.08% of pixels)

Variant: theme-catppuccin-latte (0.05% of pixels)

Variant: theme-catppuccin-macchiato (0.08% of pixels)

Variant: theme-catppuccin-mocha (0.08% of pixels)

Variant: theme-dracula (0.08% of pixels)

Variant: theme-everforest-dark (0.08% of pixels)

Variant: theme-github-dark (0.08% of pixels)

Variant: theme-gruvbox-dark (0.08% of pixels)

Variant: theme-gruvbox-light (0.02% of pixels)

Variant: theme-material-ocean (0.08% of pixels)

Variant: theme-material-palenight (0.08% of pixels)

Variant: theme-monokai-pro (0.08% of pixels)

Variant: theme-night-owl (0.08% of pixels)

Variant: theme-nord (0.08% of pixels)

Variant: theme-one-dark (0.07% of pixels)

Variant: theme-rose-pine (0.08% of pixels)

Variant: theme-solarized-dark (0.07% of pixels)

Variant: theme-solarized-light (0.05% of pixels)

Variant: theme-tokyonight (0.08% of pixels)

Variant: windows-swapclose (0.01% of pixels)

Windows — 43 views changed

Browser window — dark (0.01% of pixels)

Tab playing audio (0.00% of pixels)

Tab muted (0.01% of pixels)

Container tabs (0.01% of pixels)

Tab strip overflowing (0.00% of pixels)

Compact density (0.00% of pixels)

Sidebar — bookmarks (0.00% of pixels)

Sidebar — history (0.00% of pixels)

Right-to-left UI (0.01% of pixels)

Customize mode (0.06% of pixels)

Vertical tabs (0.01% of pixels)

Customised toolbar (0.01% of pixels)

Browser window — light (0.01% of pixels)

Address bar focused — light (0.17% of pixels)

Find bar — light (0.19% of pixels)

Variant: compact-tabs (0.01% of pixels)

Variant: enabletabview (0.01% of pixels)

Variant: hideextension (0.01% of pixels)

Variant: noidentity (0.01% of pixels)

Variant: singletabhidden (0.01% of pixels)

Variant: standard-urlbar (0.01% of pixels)

Variant: tabs-swapclose (0.01% of pixels)

Variant: theme-ayu-mirage (0.08% of pixels)

Variant: theme-catppuccin-frappe (0.09% of pixels)

Variant: theme-catppuccin-latte (0.05% of pixels)

Variant: theme-catppuccin-macchiato (0.09% of pixels)

Variant: theme-catppuccin-mocha (0.09% of pixels)

Variant: theme-dracula (0.09% of pixels)

Variant: theme-everforest-dark (0.09% of pixels)

Variant: theme-github-dark (0.08% of pixels)

Variant: theme-gruvbox-dark (0.09% of pixels)

Variant: theme-gruvbox-light (0.02% of pixels)

Variant: theme-material-ocean (0.09% of pixels)

Variant: theme-material-palenight (0.09% of pixels)

Variant: theme-monokai-pro (0.09% of pixels)

Variant: theme-night-owl (0.09% of pixels)

Variant: theme-nord (0.09% of pixels)

Variant: theme-one-dark (0.08% of pixels)

Variant: theme-rose-pine (0.09% of pixels)

Variant: theme-solarized-dark (0.07% of pixels)

Variant: theme-solarized-light (0.06% of pixels)

Variant: theme-tokyonight (0.09% of pixels)

Variant: windows-swapclose (0.01% of pixels)

Views: browser window, focused address bar, find bar — each in light and dark. Native popups (app menu, context menus) are OS-level windows and cannot be captured. Workflow run

github-actions Bot added a commit that referenced this pull request Aug 18, 2026
@AdamXweb
AdamXweb merged commit c01b653 into AdamXweb:master Aug 21, 2026
3 checks passed
github-actions Bot added a commit that referenced this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants