swarm-ui: text on badge and button fills reaches 4.5:1 in the default themes
axe found the neutral badge, the primary button and a selected card's message under AA in hyperhive light (4.39:1 and 3.82:1) and in the Mocha themes. A light palette now lightens the --purple-dim fill, the Mocha palettes darken it, and the muted text keeps more of the text colour.
This commit is contained in:
parent
5e81895a3b
commit
5b597b782f
1 changed files with 44 additions and 21 deletions
|
|
@ -79,16 +79,19 @@ default palette). Default hexes shown are Catppuccin Mocha.
|
|||
| `--pink` | `base0F` | `#f5c2e7` | thinking events |
|
||||
| `--crust` | `mix(base00 58%, #000000)` | `#11111b` | scrims and shadows (below `--bg`) |
|
||||
| `--code-bg` | `mix(base00 58%, #000000)` | `#11111b` | terminal / code block background |
|
||||
| `--muted` | `mix(base05 58%, base00)` | `#8489a1` | secondary / dimmed text |
|
||||
| `--muted` | `mix(base05 64%, base00)` | `#8e94ad` | secondary / dimmed text |
|
||||
| `--subtext0` | `mix(base05 77.7%, base00)` | `#a6adc8` | toolbar/status text; dimmer than `--fg`, lighter than `--muted` |
|
||||
|
||||
The shares in the `--muted`, `--subtext0` and `--code-bg` rows are the dark palette's.
|
||||
The light palette keeps more of the text colour (85% and 93%, set in `colors.css` as
|
||||
The shares in the `--muted`, `--subtext0` and `--code-bg` rows are the dark palette's, and what a palette that sets none of them keeps (`theme.css` holds them as fallbacks).
|
||||
The Mocha palettes keep 66% for `--muted`, since the 64% leaves it under AA on the header's fill.
|
||||
The light palette keeps more of the text colour (93% for both `--muted` and `--subtext0`, set in `colors.css` as
|
||||
`--muted-share` and `--subtext0-share`), because the dark shares leave its dimmed
|
||||
text at 2.4:1 against a card, short of the 4.5:1 AA asks for. For the same reason it
|
||||
keeps 95% of its background in `--code-bg` (`--code-bg-share`), as `--crust` is a mid
|
||||
grey on a light palette and text on it fell to 2:1. A palette that sets none of these
|
||||
variables, such as a generated one, keeps the dark shares.
|
||||
grey on a light palette and text on it fell to 2:1.
|
||||
The fill behind badges and primary buttons, `--purple-dim`, takes `--dim-share` of `base03` (the rest is `base00`): a light palette lightens it to 85%, so text on it reaches 4.5:1, and the Mocha palettes darken it to 75% for the same reason.
|
||||
`--on-dim-share` (98% on a light palette, 90% otherwise) sets how much of `--fg` the dimmed label on that fill keeps.
|
||||
A palette that sets none of these variables, such as a generated one, keeps the dark fallbacks: `--dim-share` 100% and `--on-dim-share` 90%.
|
||||
|
||||
The frosted surfaces (the headers, the badges, the terminal panes, the message box and the
|
||||
dashboard's banner) read two derived variables from `theme.css`. `--glass-clear` is `1`
|
||||
|
|
|
|||
Loading…
Reference in a new issue