Skip to content

Conversation

@jamesmockett
Copy link
Contributor

@jamesmockett jamesmockett commented Dec 11, 2025

What does this change?

Checks team colours to ensure they meet WCAG minimum contrast requirements and adds contrasting colours as appropriate

Why?

Stats are shown using team colours and need to be readable in light and dark mode

Screenshots

Screenshot 2025-12-11 at 18 09 36

@jamesmockett jamesmockett self-assigned this Dec 11, 2025
@jamesmockett jamesmockett linked an issue Dec 11, 2025 that may be closed by this pull request
@jamesmockett jamesmockett added the feature Departmental tracking: work on a new feature label Dec 11, 2025
@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch from ab60389 to 636af80 Compare December 11, 2025 18:13
@github-actions
Copy link

github-actions bot commented Dec 11, 2025

Comment on lines +152 to +153
const backgroundLight = sourcePalette.neutral[97];
const backgroundDark = sourcePalette.neutral[10];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would get these from the palette declarations, but they're only available as custom properties so we would have to fetch the values on the client, preventing us from doing the contrast calculations during the server side render.

@jamesmockett jamesmockett marked this pull request as ready for review December 12, 2025 10:20
@github-actions
Copy link

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch from 6ddf57c to 1b12961 Compare December 12, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle dynamic team colours

2 participants