diff --git a/src/styles/tokens.css b/src/styles/tokens.css index e825f4b..bea1ad8 100644 --- a/src/styles/tokens.css +++ b/src/styles/tokens.css @@ -108,14 +108,33 @@ the last place that should look like someone else's editor. They fan out from the rust ramp rather than sitting on top of it: - coral at 16, amber at 35, olive at 75. Close enough to read as one - warm family, far enough apart to stay tellable at 13px. + coral at 16, amber at 35, olive at 75. That makes one warm family, and + a warm family is exactly what cannot use hue to tell its members apart. + All three sit inside a 60° arc, which is the configuration red-green + colour-vision deficiency flattens: simulated, they land on the same + tan. Roughly 8% of men read them that way. + + So lightness carries the distinction, and the three sit at deliberately + different steps rather than all at 300 — coral 79%, amber 62%, olive + 81%. They have to interleave with the neutral code roles rather than + stack against them (`--code-comment` L* 66.5, `--code-plain` L* 85, + `--code-fn` L* 98.3): six roles share one band, and the pair that + collapses first is plain against literal, not keyword against type. Measured against `--card` (#18181b), the ground code sits on: - coral 8.7:1 · amber 9.8:1 · olive 10.1:1 — all past AAA. + coral 10.3:1 · amber 8.6:1 · olive 13.5:1 — all past AAA. + + Under a Machado et al. (2009) deuteranopia/protanopia simulation at + severity 1.0, the tightest of the fifteen code-role pairs is plain + against keyword at ΔL* 3.6 — against 2.4 before this spread, and 0.5 + under the cool palette that preceded it. Treat 3.6 as a floor rather + than headroom: six roles in the L* 66.5–98.3 band is most of what + colour alone can carry here, so a further distinction would need a + non-colour cue (weight or italic), not a fourth hue. --------------------------------------------------------------------- */ - --ak-amber-300: 35 73% 68%; /* #e9b872 types */ - --ak-olive-300: 75 48% 69%; /* #c3d68a strings and numbers */ + --ak-coral-200: 18 77% 79%; /* #f3b9a0 keywords */ + --ak-amber-400: 35 73% 62%; /* #e5aa57 types */ + --ak-olive-200: 75 48% 81%; /* #dae6b7 strings and numbers */ --ak-blue-700: 224 76% 48%; /* #1d4ed8 info fill */ /* --------------------------------------------------------------------- @@ -172,10 +191,13 @@ what changes as the flow animation moves from one method to the next. Plain code sits a step below it, and a comment a step below that. - Keywords take `--ak-rust-300`, a step lighter than the accent itself. - That is deliberate on both counts: the family is the point, and the - exact accent shade stays reserved for links and calls to action, so a - `let` never reads as something you can click. + Keywords take `--ak-coral-200`, two steps lighter than the accent rather + than one. That is deliberate on both counts: the family is the point, + and the exact accent shade stays reserved for links and calls to + action, so a `let` never reads as something you can click. One step did + not deliver it — `--ak-rust-300` sat 1.27:1 from `--ak-rust-400` and 1° + of hue away, which is not a perceptible step at 13px next to a `.link` + rendered in the accent. Two steps give 1.49:1. This is safe here for a specific reason, and the reason is worth stating because it does not always hold. Inside a code block the @@ -190,9 +212,9 @@ --code-fn: var(--ak-neutral-50); --code-plain: var(--ak-neutral-300); --code-comment: var(--ak-neutral-400); - --code-keyword: var(--ak-rust-300); - --code-type: var(--ak-amber-300); - --code-literal: var(--ak-olive-300); + --code-keyword: var(--ak-coral-200); + --code-type: var(--ak-amber-400); + --code-literal: var(--ak-olive-200); /* --------------------------------------------------------------------- ROLES — verdicts