You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/09/01 21:07:15 UTC

(maka) 04/08: fix(design-system): clear AA for the solid accent on tinted palettes

This is an automated email from the ASF dual-hosted git repository.

Astro-Han pushed a commit to branch fix/3446-secondary-grey
in repository https://gitbox.apache.org/repos/asf/maka.git

commit 26fb1b383ddb6796a338a132749b29203097c545
Author: AstroHan <le...@outlook.com>
AuthorDate: Wed Sep 2 04:51:49 2026 +0800

    fix(design-system): clear AA for the solid accent on tinted palettes
    
    `--accent-solid` was pinned at L0.52 as "the lowest lightness that clears 4.5:1
    against white". White is the wrong reading surface: only two of the eleven
    palettes have a white `--background`, and the tinted ones are brighter still
    (tokyo-night #f2f6f8, nord #f2f6f7, coral #fffbfa), which lowers the ratio
    rather than raising it. Measured against each palette's own light background,
    L0.52 put tokyo-night at 4.39:1 — under AA for link text, solid button labels
    and accent-coloured icons — with onedark 4.62:1 and nord 4.64:1 only just over.
    
    L0.48 puts all eleven at 5.15:1 or better (tokyo-night 5.15, onedark 5.37, nord
    5.46, default 6.51). Dark is untouched: L0.76 already ranges 6.98–9.76:1 against
    the dark backgrounds.
    
    The ink-ladder note picked up in the same measuring pass is corrected here too.
    It attributed the old 50% tier's figures (4.21:1 / 3.89:1) to the 54% tier that
    actually shipped, which measures 4.84:1 light on the default palette. The reason
    that tier had to go was never the default palette — it was the nine others where
    it lands between 3.4:1 and 4.4:1.
---
 DESIGN.md                                 |  2 +-
 apps/desktop/src/renderer/maka-tokens.css | 37 ++++++++++++++++++++-----------
 2 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/DESIGN.md b/DESIGN.md
index 8b897b060e..0179b605d3 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -5,7 +5,7 @@ colors:
   brand-mark: "#71a8fd"
   accent-light: "oklch(0.70 0.135 250)"
   accent-dark: "oklch(0.74 0.15 250)"
-  primary: "oklch(0.52 0.135 250)"
+  primary: "oklch(0.48 0.135 250)"
   accent-solid-dark: "oklch(0.76 0.15 250)"
   on-accent-light: "#ffffff"
   on-accent-dark: "#171717"
diff --git a/apps/desktop/src/renderer/maka-tokens.css b/apps/desktop/src/renderer/maka-tokens.css
index fc31922403..34f121c318 100644
--- a/apps/desktop/src/renderer/maka-tokens.css
+++ b/apps/desktop/src/renderer/maka-tokens.css
@@ -166,11 +166,20 @@
      accent-colored text/icons on a plain surface. --action (L0.85 chip) is too
      light to clear 1.4.3's 4.5:1 for text, so it cannot back a solid button
      label.
-     L0.52 is the lowest lightness that clears 4.5:1 against white for EVERY
-     palette (weakest is tokyo-night at 4.78:1); chroma and hue follow --accent
-     so palettes still read as themselves. This is the token the Astryx bridge
-     below hands to --color-accent. */
-  --accent-solid: oklch(from var(--accent) 0.52 c h);
+     L0.48; chroma and hue follow --accent so palettes still read as
+     themselves. This is the token the Astryx bridge below hands to
+     --color-accent.
+
+     It was L0.52, picked as the lowest lightness clearing 4.5:1 against WHITE.
+     That is the wrong reading surface: only two of the eleven palettes have a
+     white --background, and the tinted ones sit brighter (tokyo-night #f2f6f8,
+     nord #f2f6f7, coral #fffbfa), which lowers the ratio rather than raising
+     it. Measured against each palette's own light --background, L0.52 gave
+     tokyo-night 4.39:1 — under AA — with onedark 4.62:1 and nord 4.64:1 barely
+     over. L0.48 puts all eleven at 5.15:1 or better (tokyo-night 5.15, onedark
+     5.37, nord 5.46, default 6.51). Dark stays at L0.76, which already ranges
+     6.98-9.76:1 against the dark backgrounds. */
+  --accent-solid: oklch(from var(--accent) 0.48 c h);
   --link: var(--accent-solid);
   --focus-ring: var(--accent);
   --status-running: var(--accent);
@@ -289,18 +298,20 @@
      which is Astryx's own shape. One mix serves both modes.
 
      Three tiers standing on a 4.5:1 AA floor never had room to space
-     themselves: 54% muted measured 4.21:1 light and 3.89:1 dark on the default
-     palette, and across the eleven palettes it failed AA in nine of them in
-     light — onedark 3.4, nord 3.6, catppuccin 3.6. That is the direct reason
-     the middle rung goes: a ladder whose bottom rung is illegible on most
-     palettes is not a hierarchy, it is a bug with a token name.
+     themselves. 54% muted cleared AA on the default palette (4.84:1 light) and
+     failed it on nine of the other ten in light — onedark 3.4, catppuccin 3.6,
+     nord 3.7, tokyo-night 3.9, dusk 4.2, forest 4.2, sand 4.3, coral 4.3,
+     azure 4.4 — because it only sat that low to stay a visible step below the
+     tier above it. That is the direct reason the middle rung goes: a ladder
+     whose bottom rung is illegible on nine palettes out of eleven is not a
+     hierarchy, it is a bug with a token name.
 
      68% is chosen so the DEFAULT palette lands on Astryx's own
      --color-text-secondary (#525252 light / #a3a3a3 dark, 7.8:1 / 7.1:1):
      68% ink measures #525153 / #a2a2a4, 7.9:1 / 7.0:1. Every one of the eleven
-     palettes then clears AA in both modes; the worst is onedark light at
-     5.0:1. Hierarchy below these two rungs comes from size, weight and case —
-     never a third grey. */
+     palettes then clears AA in both modes — worst light is onedark 5.0:1,
+     worst dark is onedark 6.1:1. Hierarchy below these two rungs comes from
+     size, weight and case — never a third grey. */
   --muted-foreground: color-mix(in oklch, var(--foreground) 68%, var(--background));
   --state-hover-bg:    oklch(from var(--foreground) l c h / 0.04);
   --state-selected-bg: oklch(from var(--foreground) l c h / 0.065);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org