You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
report: optional brand accent colour in ReportBranding (AA-contrast foreground) #2374
Reports can carry a brand accent colour. When a report's branding sets one, the HTML report uses it as its accent, with a foreground colour that keeps WCAG AA contrast. The text, markdown and XML outputs carry it as metadata.
Changes
packages/core-contracts/src/plans.ts:ReportBranding gains an optional brandColor (a hex colour, #RRGGBB, validated).
packages/report:
renderHtml applies brandColor as the accent CSS variable (output/page/styles.css plus html.tsx).
The foreground on accent surfaces is chosen for at least a 4.5:1 contrast ratio (black or white, whichever passes; fall back to the default accent if neither does).
Markdown, text and XML outputs include the colour in their branding metadata, unstyled.
No colour set: output is byte-identical to today, so golden snapshots are unchanged.
Acceptance Criteria
The brandColor type and validation are in place; invalid values are rejected by the contracts' validator.
The HTML report uses the brand accent, with an AA-passing foreground. Tests cover a light, a dark and a mid-tone brand colour.
With no brandColor, output is unchanged (existing goldens pass).
The docs page for report branding mentions the field.
Activity
feat(report): carry white-label brand colour in markdown and text rep…