From b1fa584c223b33ea2068f5598ee6ea5fbe6c59db Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Fri, 20 Nov 2026 06:39:12 +0800 Subject: [PATCH] fix: website factory render pass polish (0.5.7) 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 --- ...0004-the-hero-scrim-lets-the-photo-show.md | 20 +++++++++++ presets.json | 36 +++++++++---------- .../overrides/pastel-dream/hero.ninjatpl | 2 +- 3 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 docs/adr/0004-the-hero-scrim-lets-the-photo-show.md diff --git a/docs/adr/0004-the-hero-scrim-lets-the-photo-show.md b/docs/adr/0004-the-hero-scrim-lets-the-photo-show.md new file mode 100644 index 0000000..97f24ff --- /dev/null +++ b/docs/adr/0004-the-hero-scrim-lets-the-photo-show.md @@ -0,0 +1,20 @@ +# The hero scrim lets the photo show + +Decided 2026-11-20 for pastel-dream 0.5.7, 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 text over images and every button against what is behind it. + +## Decision + +- The light hero scrim is a radial gradient of the theme background centred on the hero text (at 35% across for the left-aligned hero): 84% at the centre, 80% out to 55% of the radius and 40% at the corners. The flat 82% scrim of the last release met contrast but washed the photo out; the text keeps the same backing while the photo reads at the edges. The render harness measures every text element over the photo (orchestrator WO-096). +- The berry-cream preset's primary (and ring) is 345 62% 49%, was 52%. Its white button text measured 4.497:1, a hair under AA, and the outline button's pink text over the hero photo 4.36:1. +- 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: berry-cream dark destructive; berry-cream light accent; berry-cream light destructive; lavender-honey dark destructive; lavender-honey light destructive; lavender-honey light primary; matcha-cream dark destructive; matcha-cream light primary; morning-haze dark destructive; morning-haze light destructive; morning-haze light primary; peach-blossom dark destructive; peach-blossom 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. + +## Consequences + +- pastel-dream 0.5.7 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it. +- No schema field changes. + +Keywords: presets, AA, button contrast, primaryForeground, accentForeground, pastel-dream, berry-cream, preset, primary, button contrast, hero, overlayColor, scrim, radial-gradient, contrast, WO-096, website factory, render pass diff --git a/presets.json b/presets.json index 162a638..6a60cc9 100644 --- a/presets.json +++ b/presets.json @@ -16,7 +16,7 @@ "cardForeground": "335 25% 22%", "popover": "30 42% 99%", "popoverForeground": "335 25% 22%", - "primary": "340 58% 60%", + "primary": "340 58% 52%", "primaryForeground": "40 50% 98%", "secondary": "18 52% 92%", "secondaryForeground": "335 25% 24%", @@ -24,11 +24,11 @@ "mutedForeground": "335 12% 42%", "accent": "160 38% 52%", "accentForeground": "160 40% 12%", - "destructive": "0 70% 55%", + "destructive": "0 70% 52%", "destructiveForeground": "40 50% 98%", "border": "24 30% 87%", "input": "24 30% 87%", - "ring": "340 58% 60%" + "ring": "340 58% 52%" }, "darkColors": { "background": "290 22% 12%", @@ -46,7 +46,7 @@ "accent": "160 44% 60%", "accentForeground": "290 30% 12%", "destructive": "0 60% 60%", - "destructiveForeground": "320 22% 92%", + "destructiveForeground": "0 0% 9%", "border": "290 16% 26%", "input": "290 16% 24%", "ring": "340 64% 72%" @@ -70,19 +70,19 @@ "cardForeground": "345 30% 20%", "popover": "350 38% 99%", "popoverForeground": "345 30% 20%", - "primary": "345 62% 52%", + "primary": "345 62% 49%", "primaryForeground": "350 40% 98%", "secondary": "350 46% 92%", "secondaryForeground": "345 30% 22%", "muted": "350 28% 93%", "mutedForeground": "345 14% 40%", - "accent": "285 40% 55%", + "accent": "285 40% 58%", "accentForeground": "285 40% 12%", - "destructive": "0 72% 52%", + "destructive": "0 72% 51%", "destructiveForeground": "350 40% 98%", "border": "348 28% 87%", "input": "348 28% 87%", - "ring": "345 62% 52%" + "ring": "345 62% 49%" }, "darkColors": { "background": "330 24% 11%", @@ -100,7 +100,7 @@ "accent": "285 46% 66%", "accentForeground": "330 30% 11%", "destructive": "0 62% 60%", - "destructiveForeground": "340 22% 92%", + "destructiveForeground": "0 0% 9%", "border": "330 16% 25%", "input": "330 16% 23%", "ring": "345 68% 66%" @@ -124,7 +124,7 @@ "cardForeground": "150 22% 18%", "popover": "44 34% 99%", "popoverForeground": "150 22% 18%", - "primary": "148 34% 42%", + "primary": "148 34% 37%", "primaryForeground": "44 40% 98%", "secondary": "150 30% 90%", "secondaryForeground": "150 22% 20%", @@ -136,7 +136,7 @@ "destructiveForeground": "44 40% 98%", "border": "90 18% 84%", "input": "90 18% 84%", - "ring": "148 34% 42%" + "ring": "148 34% 37%" }, "darkColors": { "background": "275 20% 12%", @@ -154,7 +154,7 @@ "accent": "28 74% 62%", "accentForeground": "275 30% 12%", "destructive": "0 60% 60%", - "destructiveForeground": "44 26% 91%", + "destructiveForeground": "0 0% 9%", "border": "275 14% 26%", "input": "275 14% 24%", "ring": "148 40% 58%" @@ -178,7 +178,7 @@ "cardForeground": "270 24% 22%", "popover": "40 38% 99%", "popoverForeground": "270 24% 22%", - "primary": "265 44% 58%", + "primary": "265 44% 56%", "primaryForeground": "40 50% 98%", "secondary": "265 38% 92%", "secondaryForeground": "270 24% 24%", @@ -186,11 +186,11 @@ "mutedForeground": "270 12% 42%", "accent": "42 78% 56%", "accentForeground": "42 60% 12%", - "destructive": "0 70% 55%", + "destructive": "0 70% 52%", "destructiveForeground": "40 50% 98%", "border": "265 24% 87%", "input": "265 24% 87%", - "ring": "265 44% 58%" + "ring": "265 44% 56%" }, "darkColors": { "background": "270 26% 12%", @@ -208,7 +208,7 @@ "accent": "42 80% 62%", "accentForeground": "270 30% 12%", "destructive": "0 60% 60%", - "destructiveForeground": "265 20% 92%", + "destructiveForeground": "0 0% 9%", "border": "270 16% 26%", "input": "270 16% 24%", "ring": "265 54% 72%" @@ -233,7 +233,7 @@ "popover": "26 46% 99%", "popoverForeground": "15 30% 22%", "primary": "16 68% 56%", - "primaryForeground": "26 50% 98%", + "primaryForeground": "0 0% 9%", "secondary": "14 58% 92%", "secondaryForeground": "15 30% 24%", "muted": "26 34% 93%", @@ -262,7 +262,7 @@ "accent": "340 60% 68%", "accentForeground": "300 30% 12%", "destructive": "0 60% 60%", - "destructiveForeground": "26 26% 91%", + "destructiveForeground": "0 0% 9%", "border": "300 15% 26%", "input": "300 15% 24%", "ring": "16 74% 64%" diff --git a/templates/overrides/pastel-dream/hero.ninjatpl b/templates/overrides/pastel-dream/hero.ninjatpl index b223603..8fe21f7 100644 --- a/templates/overrides/pastel-dream/hero.ninjatpl +++ b/templates/overrides/pastel-dream/hero.ninjatpl @@ -30,7 +30,7 @@ {% set align = "center" %} {% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
-{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}{% endif %} +{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}{% endif %}
{{ herocontent(align) }}
{% endif %}