0Pricing
CSS Academy · Lesson

color-scheme Property

Use the color-scheme property to inform the browser which themes an element supports.

What is color-scheme?

The color-scheme property tells the browser which color schemes an element (or the page) supports. The browser then uses this information to style its own UI elements — scrollbars, form controls, checkboxes, input borders — to match the requested scheme.

color-scheme Values

Accepted values:

  • normal: element uses the document default
  • light: element supports light scheme only
  • dark: element supports dark scheme only
  • light dark: supports both; browser picks based on preference
  • dark light: prefers dark; falls back to light

All lessons in this course

  1. prefers-color-scheme Media Query
  2. CSS Variables for Theming
  3. color-scheme Property
  4. Automatic and Manual Dark Mode Toggle
← Back to CSS Academy