HSL with Variables
Store hue, saturation, and lightness separately to generate color families from one hue.
Store hue, saturation, and lightness separately to generate color families from one hue.
:root { --h: 220; --s: 90%;
--primary: hsl(var(--h), var(--s), 50%);
--light: hsl(var(--h), var(--s), 85%);
--dark: hsl(var(--h), var(--s), 30%); }
.green { --h: 140; }
Change --h to re-theme the entire site with a harmonious palette.