Repository navigation
fix(web): keep accent-colored text readable on Cinema Dark #4780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ export function upcomingBadgeClass(badge: string): string { | |
| switch (badge) { | ||
| case "series_premiere": | ||
| case "season_premiere": | ||
| return "border-primary/40 bg-primary/20 text-primary"; | ||
| return "border-primary/40 bg-[color-mix(in_srgb,var(--primary)_12%,var(--background))] text-primary shadow-sm"; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. S3 (medium, new): watched premiere badge with a black accent over a light poster. With a black admin accent and standard contrast, a watched premiere badge over a white poster measured 5.28:1 before this change and 3.15:1 after in Chromium; a #f0f0f0 poster gave 4.80:1 before and 3.15:1 after. The watched card's
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same cause as S1's remainder: |
||
| case "finale": | ||
| return "border-orange-800/55 bg-orange-950/90 text-orange-50 shadow-sm backdrop-blur-none"; | ||
| case "digital": | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S2 (medium): ratings can lose contrast over bright detail artwork.
--primary-textassumes a dark surface, butScoreRow(ScoreRow.tsx:18) drawstext-primarydirectly over the hero artwork. With a custom black accent and a bright backdrop in a mobile fixture, the rating text measured 13.76:1 before, 1.87:1 after, and 1.05:1 after with high contrast on. The ratio depends on the artwork and layout.Suggested repair: give the ratings a dark backing, or make sure the hero scrim keeps their whole text area dark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change here. ScoreRow sits in the detail hero beside the title and overview, which use
--foreground(#e8e8ec), lighter than any--primary-text. Wherever a backdrop is bright enough to drop the lightened rating below 4.5:1, the title and overview fail first, so the hero's dark scrim already has to keep that area dark; this PR follows the same contract. On the scrim as designed, a black accent read about 1.1:1 before this change and about 6:1 after. 🤖 Claude Code (claude-opus-5-5)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Round 2 measured this with a black accent and high contrast on, over mid-gray artwork behind the scrim: 4.50:1 before, 2.90:1 after, while white text on the same pixel reads 4.66:1. So my earlier point that the title fails first doesn't hold for that case; I was wrong there. The regression needs a near-black accent: it read well before only because black is dark and the art behind it was light. Every shipped preset gains on the same pixel (indigo goes from about 1.6:1 to above 4.5:1), and on the scrim as designed all accents now pass. Backing the ratings, or strengthening the scrim behind them, would change the hero's design for an edge case, so I'm leaving this PR as is and flagging the decision to the maintainer. 🤖 Claude Code (claude-opus-5-5)