diff options
Diffstat (limited to 'src/_functions.scss')
-rw-r--r-- | src/_functions.scss | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/_functions.scss b/src/_functions.scss index 62caf8c..b41609e 100644 --- a/src/_functions.scss +++ b/src/_functions.scss | |||
@@ -23,10 +23,14 @@ | |||
23 | $color: list.nth($level, 1); | 23 | $color: list.nth($level, 1); |
24 | $y: 0; | 24 | $y: 0; |
25 | $c: 1; | 25 | $c: 1; |
26 | $h: 0deg; | ||
26 | 27 | ||
27 | @if list.length($level) > 1 { | 28 | @if list.length($level) > 1 { |
28 | $c: list.nth($level, 2); | 29 | $c: list.nth($level, 2); |
29 | } | 30 | } |
31 | @if list.length($level) > 2 { | ||
32 | $h: list.nth($level, 3); | ||
33 | } | ||
30 | 34 | ||
31 | @if meta.type-of($color) != 'color' { | 35 | @if meta.type-of($color) != 'color' { |
32 | $y: apca.reverse($color, $ref-y); | 36 | $y: apca.reverse($color, $ref-y); |
@@ -38,7 +42,7 @@ | |||
38 | $y: $ref-y; | 42 | $y: $ref-y; |
39 | } | 43 | } |
40 | 44 | ||
41 | $color: oklch($l ($c * color.channel($base-lch, 'chroma')) color.channel($base-lch, 'hue')); | 45 | $color: oklch($l ($c * color.channel($base-lch, 'chroma')) ($h + color.channel($base-lch, 'hue'))); |
42 | } @else { | 46 | } @else { |
43 | $y: apca.sRGB_to_Y($color); | 47 | $y: apca.sRGB_to_Y($color); |
44 | } | 48 | } |