Skip to content
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

ID-426 Rework how brand colours are calculated. #303

Merged
merged 2 commits into from
Sep 30, 2024
Merged

ID-426 Rework how brand colours are calculated. #303

merged 2 commits into from
Sep 30, 2024

Conversation

halfninja
Copy link
Member

Implemented WCAG functions for contrast. Moved the definitions of key colours up into pairs of colours that are calculated to pass AA contrast, and updated links and headings, both on the page and over the default box styles, use an alternative colour if the brand colour doesn't work.

Brand testcard now passes contrast for all the new brand colours.

Changed @text-color from #383838 to #202020 for a contrast boost.

Added vitest for LESS unit tests.

Implemented WCAG functions for contrast. Moved the definitions of key colours up into pairs of colours that are calculated to pass AA contrast, and updated links and headings, both on the page and over the default box styles, use an alternative colour if the brand colour doesn't work.

Brand testcard now passes contrast for all the new brand colours.

Changed @text-color from #383838 to #202020 for a contrast boost.

Added vitest for LESS unit tests.
Secondary nav hover style was set to a darkened version of the secondary colour, but if the text is dark it makes more sense for hover to go lighter. Have implemented this with the contrast function.
Copy link

@halfninja halfninja merged commit c6f6364 into main Sep 30, 2024
7 checks passed
@halfninja halfninja deleted the ID-426 branch September 30, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants