-
Notifications
You must be signed in to change notification settings - Fork 334
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 organisation colours #3407
Conversation
If we choose to deprecate organisations that no longer exist, here's a table of how each organisation has been split, merged or renamed.
|
I've opted to deprecate the Government Equalities Office from the list of organisations. The GEO is one of the few organisations in the list that is not a ministerial department, and it's the only one that is an agency, being an agency of the Cabinet Office. Agencies typically use the brand colours of their parent departments, so listing the GEO separately is redundant, as it shares the CO's colours. (It was previously part of the Home Office, which is why the colour currently shipped with Frontend is HO purple.) |
2443561
to
234fac9
Compare
234fac9
to
09c72bc
Compare
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.
I haven't reviewed the colour changes, only the code changes.
09c72bc
to
45ba384
Compare
I've received some documentation on what the colours are for the current ministerial departments. Will update this PR once I've ironed out some possible wrinkles. |
I've been in contact with Design102, the design agency unit of the Government Communication Service—who are, as far as I can tell, the most definitive authority we have on the specific brand colours of all government departments. We have most of the colours now, but there's seemingly some contention over the specific colours used by the new departments (DESNZ and DSIT, specifically). We're still trying to iron those out. In the meantime, I've plugged what colours we do have into the code I used to generate the contrast-safe colours and push them to a personal repo: https://github.com/querkmachine/hmg-department-colours/ (The DESNZ and DSIT colours are still those from my prior investigation). You can see the output it produces here: https://querkmachine.github.io/hmg-department-colours/ |
I've got some documentation from design102 dated January 2021 published on our intranet that the Home Office purple is now #732282 - would it be possible to include this in the changes? (and will close #3597) (which should also already be AAA compliant with white text on top) |
45ba384
to
a615d19
Compare
a615d19
to
4385706
Compare
4385706
to
1a43d8a
Compare
1a43d8a
to
9baef55
Compare
9baef55
to
0e746f0
Compare
1f6fe36
to
bb62061
Compare
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.
Thanks for your patience with merging this one @querkmachine, and all the colour hunting that happened before. Looks good to go, only one little nitpick about test name wording, but that won't block approval 🙌🏻
packages/govuk-frontend/src/govuk/settings/colours.unit.test.js
Outdated
Show resolved
Hide resolved
- Update review app example for 2024 MOG change - Rename organisation colour test to match what is actually being tested - Move incorrectly located changelog entry
Update organisation colours
Having previously said this didn't look controversial, it now seems to have gained a level of controversy. It seems that some - or at least one - department(s) were previously using the standard blue for their links, and are now finding this to be an undesirable update. JP has gathered responses from Trade Remedies Authority, Companies House, Insolvency Service, and Office of the Immigration Services Commissioner. They have said things like users are "finding the red font harder to read" and "it is causing issues for some users" - these Departments all inherit from their parent DBT. Looking at their pages I can see their point, particularly when viewing links that haven't been bolded. I don't want to get into a situation where we do one thing for one set of departments and another for others, so I see a couple of options:
I was previously questioning whether the colours were considered fit for linking purposes but I guess we sort of made that decision previously when Beeps presented the screenshots. In light of seeing the red though, I'm less convinced than I was. |
A long-overdue update to our somewhat fairly outdated
_colours-organisations.scss
file. In addition to adding missing organisations and updating the colours, I've tried to tackle the comments in #1919.The main colours for all existing organisations haven't changed: reds are still red, blues are still blues (with the exception of UK Export Finance, which has rebranded in the intervening years). The specific shades are different though, as are many of the contrast-safe equivalent colours and shades.
Changes
Changes to code
$govuk-new-organisation-colours
feature flag to enable the new colour palette.govuk-organisation-colour
function to produce a warning when a defunct organisation is referenced.contrast-safe
key to colour map and$contrast-safe
parameter to thegovuk-organisation-colour
mixin, to clearly indicate the intent behind them.colour-websafe
key and$websafe
function parameter, respectively.Changes to organisations listed
department-for-energy-security-net-zero
department-for-science-innovation-technology
department-of-health-social-care
foreign-commonwealth-development-office
ministry-of-housing-communities-local-government
office-of-the-secretary-of-state-for-scotland
office-of-the-secretary-of-state-for-wales
prime-ministers-office-10-downing-street
department-for-business-energy-industrial-strategy
department-for-digital-culture-media-sport
department-for-levelling-up-housing-communities
government-equalities-office
. See this comment for why I've opted to deprecate GEO.department-for-business-and-trade
→department-for-business-trade
department-for-communities-and-local-government
→department-for-communities-local-government
department-for-levelling-up-housing-and-communities
→department-for-levelling-up-housing-communities
government-equalities-office
changes from purple to blue. At the time the file was last updated GEO was part of the Home Office. It is now part of the Cabinet Office.uk-export-finance
changes from dark green to red, to match their present branding.Determining contrast-safe colours
Previously, there didn't appear to be much consistency in how contrast-safe colours were determined.
As noted in #1919, many of the colours intended to have higher contrast were actually lower contrast than the organisation's brand colour. Some organisations used completely different contrast-safe colours, like having a red brand colour but a blue contrast-safe colour. The selections made for contrast-safe colours appeared to be largely arbitrary.
Rather than try and work around that, I wrote a simple program:
The resulting colours and contrast ratios are on this webpage that I put together.
This does mean that many colours that used to have 'contrast-safe' variants no longer do, as the brand colour already met the contrast requirement. This may be undesirable, as these (usually more muted) variant colours are currently used to style links on GOV.UK differently, and these will now appear identical to the brand colour.
I would argue that we call a duck a duck, and if there is a need for use case-specific variants of the brand colour, we define a process for what they are and explicitly name them as variants or according to their use case.
Possible changes