How to let your users change the color scheme of your site

SuperHi on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI23 min

About this video

A tutorial on building a site where visitors can change the background colour, using HTML, CSS and JavaScript. It shows how to add the markup and styles, add a script, and detect dark backgrounds, using a portfolio site as the example.

What you’ll learn

  • Add HTML and CSS controls that let users change the background colour
  • Add a script that applies the chosen colour to the page
  • Detect dark backgrounds to adjust the interface for legibility