diff --git a/docs/adr/0004-every-preset-colour-meets-aa-with-its-foreground.md b/docs/adr/0004-every-preset-colour-meets-aa-with-its-foreground.md new file mode 100644 index 0000000..67ee551 --- /dev/null +++ b/docs/adr/0004-every-preset-colour-meets-aa-with-its-foreground.md @@ -0,0 +1,19 @@ +# Every preset colour meets AA with its foreground, and the hero eyebrow reads on a photo + +Decided 2026-11-20 for noir 0.4.6, from the website factory's final render pass (orchestrator WO-096, ADR 0084). + +## Context + +The website factory compiles a customer's site onto this theme. The render pass screenshots every page at 1280 and 390 pixels and measures every button's text against its fill. + +## Decision + +- Every preset's primary, secondary, accent and destructive colour meets AA (4.5:1) with its foreground in both schemes. The render pass measures every button, and these pairs were under it: cold-case dark destructive; evidence-red dark accent; evidence-red dark destructive; evidence-red light accent; interrogation dark destructive; redaction dark destructive; redaction dark primary; safelight dark destructive; safelight light accent; safelight light primary. Each colour moved the least lightness (at most ten points) that reaches 4.5 with its own foreground, and a colour that could not switched its foreground to white or near-black; a token that held the same colour (the ring) moved with it. The orchestrator's brand colour step keeps whatever contrast a preset has, so a preset under AA also left a branded site under it. +- The hero eyebrow over a photo is white. It was the primary red on the dark scrim and measured 2.3:1. + +## Consequences + +- noir 0.4.6 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it. +- No schema field changes. A site keeps the colours it has until a preset is applied again. + +Keywords: noir, hero, eyebrow, noir-label, presets, AA, button contrast, primaryForeground, accentForeground, secondaryForeground, destructiveForeground, WO-096, website factory, render pass diff --git a/presets.json b/presets.json index 104c062..75bcd9d 100644 --- a/presets.json +++ b/presets.json @@ -48,7 +48,7 @@ "mutedForeground": "40 10% 60%", "accent": "32 78% 50%", "accentForeground": "30 22% 8%", - "destructive": "0 70% 52%", + "destructive": "0 70% 47%", "destructiveForeground": "40 20% 92%", "border": "30 8% 20%", "input": "30 8% 18%", @@ -82,7 +82,7 @@ "secondaryForeground": "0 8% 12%", "muted": "20 8% 92%", "mutedForeground": "12 9% 29%", - "accent": "8 68% 50%", + "accent": "8 68% 48%", "accentForeground": "20 12% 98%", "destructive": "358 78% 42%", "destructiveForeground": "20 12% 98%", @@ -103,9 +103,9 @@ "secondaryForeground": "10 12% 86%", "muted": "0 10% 12%", "mutedForeground": "8 10% 60%", - "accent": "6 74% 52%", + "accent": "6 74% 55%", "accentForeground": "0 15% 8%", - "destructive": "2 80% 54%", + "destructive": "2 80% 45%", "destructiveForeground": "10 12% 92%", "border": "0 10% 19%", "input": "0 10% 16%", @@ -133,19 +133,19 @@ "cardForeground": "30 18% 12%", "popover": "38 34% 98%", "popoverForeground": "30 18% 12%", - "primary": "32 74% 44%", + "primary": "32 74% 37%", "primaryForeground": "38 30% 97%", "secondary": "38 16% 88%", "secondaryForeground": "30 18% 14%", "muted": "38 14% 90%", "mutedForeground": "32 14% 30%", - "accent": "26 70% 48%", + "accent": "26 70% 40%", "accentForeground": "38 30% 97%", "destructive": "0 70% 44%", "destructiveForeground": "38 30% 97%", "border": "34 16% 80%", "input": "34 14% 84%", - "ring": "32 74% 44%" + "ring": "32 74% 37%" }, "darkColors": { "background": "28 22% 6%", @@ -162,7 +162,7 @@ "mutedForeground": "36 16% 60%", "accent": "28 76% 50%", "accentForeground": "28 24% 7%", - "destructive": "0 72% 52%", + "destructive": "0 72% 47%", "destructiveForeground": "38 28% 92%", "border": "28 18% 19%", "input": "28 16% 16%", @@ -219,7 +219,7 @@ "mutedForeground": "212 14% 60%", "accent": "6 72% 54%", "accentForeground": "215 26% 7%", - "destructive": "0 70% 52%", + "destructive": "0 70% 47%", "destructiveForeground": "210 18% 92%", "border": "215 18% 20%", "input": "215 16% 17%", @@ -268,7 +268,7 @@ "cardForeground": "0 0% 90%", "popover": "0 0% 8%", "popoverForeground": "0 0% 90%", - "primary": "2 72% 54%", + "primary": "2 72% 56%", "primaryForeground": "0 0% 6%", "secondary": "0 0% 14%", "secondaryForeground": "0 0% 86%", @@ -276,11 +276,11 @@ "mutedForeground": "0 0% 58%", "accent": "0 0% 88%", "accentForeground": "0 0% 8%", - "destructive": "2 74% 52%", + "destructive": "2 74% 46%", "destructiveForeground": "0 0% 92%", "border": "0 0% 19%", "input": "0 0% 16%", - "ring": "2 72% 54%" + "ring": "2 72% 56%" } } } diff --git a/templates/overrides/noir/hero.ninjatpl b/templates/overrides/noir/hero.ninjatpl index 5851f7d..2fcd8f7 100644 --- a/templates/overrides/noir/hero.ninjatpl +++ b/templates/overrides/noir/hero.ninjatpl @@ -12,7 +12,7 @@ {# With a background image the content sits on a dark grayscale photo + dark scrim in BOTH modes, so onImg switches text to light utility classes. #} {% set showOverlay = hasImage %} {% macro herocontent(align, onImg) %} -{% if eyebrowText %}
{{ eyebrowText }}
{% endif %} +{% if eyebrowText %}
{{ eyebrowText }}
{% endif %} {% if headlineText %}

{{ headlineText }}

{% endif %} {% if subText %}

{{ subText }}

{% endif %} {% if descText %}

{{ descText }}

{% endif %}