Frontend Developer

Case File: The Brand Colour and the Dark Mode

A shop's brand colour is typed out in three places and the owner wants a dark mode for the night shift. Move the colours into CSS custom properties, add a switch that changes them all at once and tells a screen reader its state, and make sure the text can still be read: the lab measures the contrast ratio of the real colours the browser computes, in light and in dark mode. The brand colour and the dark background are generated for you alone.

50 min

Case File: The Brand Colour and the Dark Mode

A shop's brand colour is typed out in three places and the owner wants a dark mode for the night shift. Move the colours into CSS custom properties, add a switch that changes them all at once and tells a screen reader its state, and make sure the text can still be read: the lab measures the contrast ratio of the real colours the browser computes, in light and in dark mode. The brand colour and the dark background are generated for you alone.

In this lesson:

  • css
  • custom properties
  • dark mode
  • contrast
  • accessibility
  • theming
  • case-file

๐Ÿ”’ This lesson is part of a paid plan

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans