Advanced CSS | Using CSS variables and the calc function to create variable shades

VirtualAddiction on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateDesign Engineering8 min

About this video

The video shows how to define a base colour in a CSS variable and use calc() to produce lighter and darker shades. It then applies the palette to page elements and shows how variables make a site's colour scheme easier to manage.

What you’ll learn

  • Generate lighter and darker shades of a base colour with CSS variables and calc()
  • Apply a generated colour palette to page elements
  • Change a site's colour scheme by adjusting one variable value