Skip to content

Instantly share code, notes, and snippets.

@menangen
Created March 26, 2020 23:44
Show Gist options
  • Save menangen/0d68f064daee40e8cb82c20a84c1f90f to your computer and use it in GitHub Desktop.
Save menangen/0d68f064daee40e8cb82c20a84c1f90f to your computer and use it in GitHub Desktop.
CSS HSL Formulas
$value: 100;
$value2: $value + 24;
$A: 100 / 12;
$B: 360 / 12;
$bgcolor: hsl($value, $A * 12, $A * 10 - ($A / 4) * 1 );
$color-1: hsl($value, 72%, 83%);
$color-2: hsl($value2 + $B, $A * 8, $A * 8);
$color-3: hsl($value2 + $B - 12, $A * 8, $A * 9);
$color-4: hsl($value2 + $B - 6, $A * 11, $A * 8);
BODY {
background-color: $color-1;
}
#main {
color: $color-2;
font-size: 32px;
height: 128px;
width: 128px;
background-color: $bgcolor;
a {
font-weight: bold;
color: $color-3;
&:hover { color: $color-4; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment