summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-12-09 16:56:25 +0100
committerVolpeon <git@volpeon.ink>2024-12-09 16:56:25 +0100
commit404a407e5c60494509d3aa1bdb57155184bc4367 (patch)
tree392b958d00d2b7bf6704f3e2294ba945948aa033 /src
parentRevert "Style lists by default" (diff)
downloadiro-design-master.tar.gz
iro-design-master.tar.bz2
iro-design-master.zip
Support hue rotationHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/_functions.scss6
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 }