fix: website factory render pass polish (0.4.6)

Hero scrim, button and preset contrast and layout fixes found by the
WO-096 render pass; see docs/adr.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-11-20 06:39:13 +08:00
parent 021bc3041f
commit e4678b42dd
3 changed files with 32 additions and 13 deletions

View File

@ -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

View File

@ -48,7 +48,7 @@
"mutedForeground": "40 10% 60%", "mutedForeground": "40 10% 60%",
"accent": "32 78% 50%", "accent": "32 78% 50%",
"accentForeground": "30 22% 8%", "accentForeground": "30 22% 8%",
"destructive": "0 70% 52%", "destructive": "0 70% 47%",
"destructiveForeground": "40 20% 92%", "destructiveForeground": "40 20% 92%",
"border": "30 8% 20%", "border": "30 8% 20%",
"input": "30 8% 18%", "input": "30 8% 18%",
@ -82,7 +82,7 @@
"secondaryForeground": "0 8% 12%", "secondaryForeground": "0 8% 12%",
"muted": "20 8% 92%", "muted": "20 8% 92%",
"mutedForeground": "12 9% 29%", "mutedForeground": "12 9% 29%",
"accent": "8 68% 50%", "accent": "8 68% 48%",
"accentForeground": "20 12% 98%", "accentForeground": "20 12% 98%",
"destructive": "358 78% 42%", "destructive": "358 78% 42%",
"destructiveForeground": "20 12% 98%", "destructiveForeground": "20 12% 98%",
@ -103,9 +103,9 @@
"secondaryForeground": "10 12% 86%", "secondaryForeground": "10 12% 86%",
"muted": "0 10% 12%", "muted": "0 10% 12%",
"mutedForeground": "8 10% 60%", "mutedForeground": "8 10% 60%",
"accent": "6 74% 52%", "accent": "6 74% 55%",
"accentForeground": "0 15% 8%", "accentForeground": "0 15% 8%",
"destructive": "2 80% 54%", "destructive": "2 80% 45%",
"destructiveForeground": "10 12% 92%", "destructiveForeground": "10 12% 92%",
"border": "0 10% 19%", "border": "0 10% 19%",
"input": "0 10% 16%", "input": "0 10% 16%",
@ -133,19 +133,19 @@
"cardForeground": "30 18% 12%", "cardForeground": "30 18% 12%",
"popover": "38 34% 98%", "popover": "38 34% 98%",
"popoverForeground": "30 18% 12%", "popoverForeground": "30 18% 12%",
"primary": "32 74% 44%", "primary": "32 74% 37%",
"primaryForeground": "38 30% 97%", "primaryForeground": "38 30% 97%",
"secondary": "38 16% 88%", "secondary": "38 16% 88%",
"secondaryForeground": "30 18% 14%", "secondaryForeground": "30 18% 14%",
"muted": "38 14% 90%", "muted": "38 14% 90%",
"mutedForeground": "32 14% 30%", "mutedForeground": "32 14% 30%",
"accent": "26 70% 48%", "accent": "26 70% 40%",
"accentForeground": "38 30% 97%", "accentForeground": "38 30% 97%",
"destructive": "0 70% 44%", "destructive": "0 70% 44%",
"destructiveForeground": "38 30% 97%", "destructiveForeground": "38 30% 97%",
"border": "34 16% 80%", "border": "34 16% 80%",
"input": "34 14% 84%", "input": "34 14% 84%",
"ring": "32 74% 44%" "ring": "32 74% 37%"
}, },
"darkColors": { "darkColors": {
"background": "28 22% 6%", "background": "28 22% 6%",
@ -162,7 +162,7 @@
"mutedForeground": "36 16% 60%", "mutedForeground": "36 16% 60%",
"accent": "28 76% 50%", "accent": "28 76% 50%",
"accentForeground": "28 24% 7%", "accentForeground": "28 24% 7%",
"destructive": "0 72% 52%", "destructive": "0 72% 47%",
"destructiveForeground": "38 28% 92%", "destructiveForeground": "38 28% 92%",
"border": "28 18% 19%", "border": "28 18% 19%",
"input": "28 16% 16%", "input": "28 16% 16%",
@ -219,7 +219,7 @@
"mutedForeground": "212 14% 60%", "mutedForeground": "212 14% 60%",
"accent": "6 72% 54%", "accent": "6 72% 54%",
"accentForeground": "215 26% 7%", "accentForeground": "215 26% 7%",
"destructive": "0 70% 52%", "destructive": "0 70% 47%",
"destructiveForeground": "210 18% 92%", "destructiveForeground": "210 18% 92%",
"border": "215 18% 20%", "border": "215 18% 20%",
"input": "215 16% 17%", "input": "215 16% 17%",
@ -268,7 +268,7 @@
"cardForeground": "0 0% 90%", "cardForeground": "0 0% 90%",
"popover": "0 0% 8%", "popover": "0 0% 8%",
"popoverForeground": "0 0% 90%", "popoverForeground": "0 0% 90%",
"primary": "2 72% 54%", "primary": "2 72% 56%",
"primaryForeground": "0 0% 6%", "primaryForeground": "0 0% 6%",
"secondary": "0 0% 14%", "secondary": "0 0% 14%",
"secondaryForeground": "0 0% 86%", "secondaryForeground": "0 0% 86%",
@ -276,11 +276,11 @@
"mutedForeground": "0 0% 58%", "mutedForeground": "0 0% 58%",
"accent": "0 0% 88%", "accent": "0 0% 88%",
"accentForeground": "0 0% 8%", "accentForeground": "0 0% 8%",
"destructive": "2 74% 52%", "destructive": "2 74% 46%",
"destructiveForeground": "0 0% 92%", "destructiveForeground": "0 0% 92%",
"border": "0 0% 19%", "border": "0 0% 19%",
"input": "0 0% 16%", "input": "0 0% 16%",
"ring": "2 72% 54%" "ring": "2 72% 56%"
} }
} }
} }

View File

@ -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. #} {# 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 %} {% set showOverlay = hasImage %}
{% macro herocontent(align, onImg) %} {% macro herocontent(align, onImg) %}
{% if eyebrowText %}<div class="mb-5 flex items-center gap-4 {% if align == "center" %}justify-center{% endif %}"><span class="noir-rule w-10"></span><span class="noir-label{% if onImg %} text-primary{% endif %}"{% if not onImg %} style="color:hsl(var(--primary));"{% endif %}>{{ eyebrowText }}</span><span class="noir-rule w-10"></span></div>{% endif %} {% if eyebrowText %}<div class="mb-5 flex items-center gap-4 {% if align == "center" %}justify-center{% endif %}"><span class="noir-rule w-10"></span><span class="noir-label{% if onImg %} text-white{% endif %}"{% if not onImg %} style="color:hsl(var(--primary));"{% endif %}>{{ eyebrowText }}</span><span class="noir-rule w-10"></span></div>{% endif %}
{% if headlineText %}<h1 class="noir-heading text-4xl sm:text-5xl lg:text-6xl leading-tight{% if onImg %} text-white{% endif %}"{% if not onImg %} style="color:hsl(var(--foreground));"{% endif %}>{{ headlineText }}</h1>{% endif %} {% if headlineText %}<h1 class="noir-heading text-4xl sm:text-5xl lg:text-6xl leading-tight{% if onImg %} text-white{% endif %}"{% if not onImg %} style="color:hsl(var(--foreground));"{% endif %}>{{ headlineText }}</h1>{% endif %}
{% if subText %}<h2 class="noir-body mt-5 text-xl sm:text-2xl max-w-2xl{% if align == "center" %} mx-auto{% endif %}"{% if onImg %} style="color: rgb(255 255 255 / 0.85);"{% else %} style="color:hsl(var(--muted-foreground));"{% endif %}>{{ subText }}</h2>{% endif %} {% if subText %}<h2 class="noir-body mt-5 text-xl sm:text-2xl max-w-2xl{% if align == "center" %} mx-auto{% endif %}"{% if onImg %} style="color: rgb(255 255 255 / 0.85);"{% else %} style="color:hsl(var(--muted-foreground));"{% endif %}>{{ subText }}</h2>{% endif %}
{% if descText %}<p class="noir-body mt-4 max-w-xl leading-relaxed{% if align == "center" %} mx-auto{% endif %}"{% if onImg %} style="color: rgb(255 255 255 / 0.80);"{% else %} style="color:hsl(var(--muted-foreground));"{% endif %}>{{ descText }}</p>{% endif %} {% if descText %}<p class="noir-body mt-4 max-w-xl leading-relaxed{% if align == "center" %} mx-auto{% endif %}"{% if onImg %} style="color: rgb(255 255 255 / 0.80);"{% else %} style="color:hsl(var(--muted-foreground));"{% endif %}>{{ descText }}</p>{% endif %}