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

Update colour palette #1288

Merged
merged 13 commits into from
Apr 29, 2019
Merged

Update colour palette #1288

merged 13 commits into from
Apr 29, 2019

Conversation

36degrees
Copy link
Contributor

@36degrees 36degrees commented Apr 24, 2019

This updates GOV.UK Frontend to use the new palette, as designed by the GOV.UK graphic design community.

This is part of a broader series of work which will be released as part of v3.0, which also includes changes to the hover and focus states of many components.

Changes to the palette

Colour Before After Notes
purple #2e358b #4c2c92 updated to match visited link colour
light-purple #6f72af #6f72af
bright-purple #912b88 #912b88
pink #d53880 #d53880
light-pink #f499be #f499be
red #b10e1e #d4351c updated
bright-red #df3034 removed, as it was very similar to the new red
orange #f47738 #f47738
brown #b58840 #b58840
yellow #ffbf47 #ffdd00 updated
light-green #85994b #85994b
green #006435 #00703c updated
turquoise #28a197 #28a197
light-blue #2b8cc4 #5694ca updated
blue #005ea5 #1d70b8 updated
dark-blue #003078 added
black #0b0c0c #0b0c0c
grey-1 #6f777b removed
dark-grey #6f777b added
grey-2 #bfc1c3 removed
mid-grey #b1b4b6 added
grey-3 #dee0e2 removed
grey-4 #f8f8f8 removed
light-grey #f3f2f1 added
white #ffffff #ffffff

Changes to components and styles

It also makes changes to the way that some of these colours are used, including:

  • the button component now uses the green from the colour palette, instead of a custom green previously only used for the button
  • the confirmation panel now uses a green background rather than a turquoise background
  • links now get darker when hovered, rather than lighter
  • visited links remain the same colour, but the purple in the palette has been updated to match

Maintaining compatibility with GOV.UK Template, Frontend Toolkit and Elements

When GOV.UK Frontend is run in 'compatibility mode', the legacy palette will be used and components will continue to use the existing colours (for example, the panel will continue to be turquoise).

This is so that services can continue to adopt GOV.UK Frontend gradually, without having a mix of the two different palettes appearing within a service or a single page.

To support this:

  • a new setting $govuk-use-legacy-palette has been added, which by default will be true if any of $govuk-compatibility-govukfrontendtoolkit, $govuk-compatibility-govuktemplate or $govuk-compatibility-govukelements are true.
  • the govuk-colour function has been updated to add a $legacy argument, which specifies the colour (either a literal, or a name of a colour from the legacy palette) to use when $govuk-use-legacy-palette is true.
  • in some places we are conditionally setting variables based on the value of $govuk-use-legacy-palette

Any new components that are implemented whilst this arrangement is in place will need to be designed for both contexts.

You can see how 'legacy mode' looks in the review app by appending ?legacy=1 to the URL:
https://govuk-frontend-review-pr-1288.herokuapp.com/?legacy=1

@36degrees 36degrees added this to the v3.0.0 milestone Apr 24, 2019
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1288 April 24, 2019 17:24 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1288 April 24, 2019 17:33 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1288 April 24, 2019 17:37 Inactive
@36degrees 36degrees changed the base branch from master to v3 April 25, 2019 12:56
Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

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

I've reviewed this with @aliuk2012 and we think the changes are very good, but we need a changelog entry that shows how to migrate to the new colours.

We think there is a user need to help people pick a new colour for those that have no direct replacement.

This will allow us to maintain the existing colour palette for users of GOV.UK Frontend who are migrating, and using it alongside GOV.UK Elements, Template or Frontend Toolkit.
We are removing this because the red in the palette has been updated, and there is now very little difference between 'red' and 'bright red'.
The hover style for this component will eventually change, but to keep changes contained we're just updating it with the closest colour right now.
This addresses an issue with low colour contrast between the text (white) and the background (turquoise) whilst simplifying the palette
@36degrees
Copy link
Contributor Author

Rebased against master and changelog entry added.

@NickColley @aliuk2012 thanks for the review – let me know if you're happy with it 👍

Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

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

Very very good CHANGELOG entry, nice would read again A+ seller, thanks Ollie

Copy link
Contributor

@aliuk2012 aliuk2012 left a comment

Choose a reason for hiding this comment

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

Perfect 👍 🚀 🍾

@36degrees 36degrees merged commit 3d6f784 into v3 Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants