Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Created January 7, 2020 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsh-code/7da22f4085541aad2493d9ed50b0a148 to your computer and use it in GitHub Desktop.
Save tsh-code/7da22f4085541aad2493d9ed50b0a148 to your computer and use it in GitHub Desktop.
:root {
--primary-color-h: 156;
--primary-color-s: 50%;
--primary-color-l: 50%;
--primary-color: hsl(var(—primary-color-h), var(--primary-color-s), var(--primary-color-l));
/* lighten */
--primary-color--light: hsl(var(--primary-color-h), var(--primary-color-s), calc(var(--primary-color-l) + 15%));
/* darken */
--primary-color--dark: hsl(var(--primary-color-h), var(--primary-color-s), calc(var(--primary-color-l) - 15%));
/* complement */
--primary-color--complement: hsl(calc(var(--primary-color-h) + 180), var(--primary-color-s), var(--primary-color-l));
/* triad */
--primary-color--triada-1: hsl(calc(var(--primary-color-h) + 120), var(--primary-color-s), var(--primary-color-l));
--primary-color--triada-2: hsl(calc(var(--primary-color-h) + 240), var(--primary-color-s), var(--primary-color-l));
/* analogous */
--degree: 15;
--primary-color--analogous-1: hsl(
calc(var(--primary-color-h) + var(--degree)),
var(--primary-color-s),
var(--primary-color-l)
);
--primary-color--analogous-2: hsl(
calc(var(--primary-color-h) - var(--degree)),
var(--primary-color-s),
var(--primary-color-l)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment