alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

Spike to understand which colours would need adjusting to have a well designed dark mode #4903

Closed romaricpascal closed 6 months ago

romaricpascal commented 7 months ago

What

Create stylesheet overriding our styles as bluntly as necessary to define which colours would need changing to implement dark mode, form a design point of view.

Particular attention might be necessary around links and focus styles.

Why

This will let us indentify the scope of the colours needing to be adjusted to support a dark mode.

Who needs to work on this

Designers, potentially with support from developers and accessibility specialist

Who needs to review this

Designers

Done when

36degrees commented 7 months ago

@christopherthomasdesign is it accurate to say you're working on this one?

christopherthomasdesign commented 7 months ago

Yes it is! Hoping to push something and write a summary on Monday 👍

christopherthomasdesign commented 7 months ago

Sorry for the delay!

I’ve thrown a quick experiment onto a branch at https://github.com/alphagov/govuk-frontend/tree/darkmode-palette.

It largely uses the palette developed by the planet-centred design working group at GDS. I've made some tweaks to improve colour contrast, but I haven't tested every colour combination at this point.

You can probs just use the diff in that branch to see what I've changed, but here are a few thoughts I jotted down as I was going through:

querkmachine commented 7 months ago
  • for ‘area’ hovers like task list, that background obvs needs to still work with any text… so it may work better for it to go darker (see the accordion and task list states)
  • that isn't too different to how it works in light mode, where it goes from white to grey – as discussed, might we need a concept of govuk-area-hover-colour or something?

This would align with my understanding for how dark modes should typically work. Dark mode shouldn't work like an inversion of light mode, but just as a darkening. If in light themes Thing A is darker than Thing B, or if Thing C becomes darker when focused, the same should be true when dark.

romaricpascal commented 6 months ago

Forgot to tidy issues at the end of the cycle, so closing this now 😊