Skip to content

Conversation

@jamesmockett
Copy link
Contributor

@jamesmockett jamesmockett commented Dec 11, 2025

What does this change?

Use black or white instead of team colours for figures. Adds contrast check for team colours in graph to ensure they meet WCAG minimum contrast requirements and adds contrasting border as needed for visibility.

Why?

The bar graph is shown using team colours and need to be visible in light and dark mode.

We assume that contrast will only be needed for either light or dark mode, not both. This allows use of the existing palette declarations to always apply a border to the graph when contrast is required, but switch between a contrasting colour and transparent for light or dark mode as required.

Screenshots

Screenshot 2025-12-24 at 12 24 48

@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

@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
@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch from 1b12961 to fa1446a Compare December 23, 2025 14:54
@github-actions
Copy link

github-actions bot commented Dec 23, 2025

@jamesmockett jamesmockett changed the title Ensure team colours have sufficient contrast Handle dynamic team colours and ensure sufficient contrast Dec 23, 2025
@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch 3 times, most recently from afcee16 to a3481a4 Compare December 24, 2025 12:28
@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch from a3481a4 to ff46223 Compare January 5, 2026 14:34
@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch from b72755f to 355f189 Compare January 22, 2026 16:44
@jamesmockett jamesmockett force-pushed the jm/football-colour-contrast branch from 355f189 to fd3c512 Compare January 22, 2026 16:46
@jamesmockett
Copy link
Contributor Author

Closing in favour of #15198

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.

2 participants