From 9c704e92fbb3a1951fc089d2dbcae1b84f08ac7d Mon Sep 17 00:00:00 2001 From: shane Date: Sun, 6 Dec 2026 07:41:46 -0800 Subject: [PATCH] A cut's titles draw white on their dark plate, never in the brand's text colour (#366) Co-authored-by: shinyobjectz --- sdk/cloud/image/Title.tsx | 4 +++- sdk/cloud/test/units.ts | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sdk/cloud/image/Title.tsx b/sdk/cloud/image/Title.tsx index 05ab95ac..0c6d04f9 100644 --- a/sdk/cloud/image/Title.tsx +++ b/sdk/cloud/image/Title.tsx @@ -83,7 +83,9 @@ export default function Title({ children, region = "top", size = 64, style, face fontWeight: 800, fontSize: size, lineHeight: 1.1, - color: "var(--brand-text, #fff)", + // white on its own dark plate, as raea's captions are (brand.ts CAPTION): never the website's text colour, which + // is dark for a light page (12-06, Dutch on rc5: every hook black on the plate, 1.3:1, five floor errors) + color: "#fff", // a dark plate, as raea's captions have: a hook over a beige coat or a sky read under 3:1 with a shadow alone background: "rgba(0,0,0,0.6)", padding: `${Math.round(px * 0.08)}px ${Math.round(px * 0.3)}px`, diff --git a/sdk/cloud/test/units.ts b/sdk/cloud/test/units.ts index 0a66c1e4..568d4f1e 100644 --- a/sdk/cloud/test/units.ts +++ b/sdk/cloud/test/units.ts @@ -376,3 +376,15 @@ exit 0 assert.equal(otherRaea("0.1.16", "reading", false), undefined) console.log("ok a box refuses a worker on another raea") } + +// a cut's titles and captions draw white on raea's dark plate, never in a brand's own text colour, which is dark for a +// light website (12-06, Dutch on 0.1.17-rc5: every hook black on the plate at 1.3:1, five floor errors) +{ + const title = readFileSync(new URL("../image/Title.tsx", import.meta.url), "utf8") + const colour = title.match(/^\s*color: (.+),$/m)?.[1] + assert.equal(colour, '"#fff"', `Title's words are ${colour}`) + assert.match(title, /background: "rgba\(0,0,0,0\.6\)"/) + const brand = readFileSync(new URL("../image/brand.ts", import.meta.url), "utf8") + assert.match(brand, /export const CAPTION = \{[^}]*color: "#fff"/) + console.log("ok titles and captions draw white on their dark plate") +}