summaryrefslogtreecommitdiffstats
path: root/src/_functions.scss
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-10-15 18:06:26 +0200
committerVolpeon <git@volpeon.ink>2024-10-15 18:06:26 +0200
commit4ecdedcdd15724967c946a498b1ebff3b5cc76fa (patch)
tree9e18094acac4854233b74139b0d178ebb08543d9 /src/_functions.scss
parentTheme adjustments (diff)
downloadiro-design-4ecdedcdd15724967c946a498b1ebff3b5cc76fa.tar.gz
iro-design-4ecdedcdd15724967c946a498b1ebff3b5cc76fa.tar.bz2
iro-design-4ecdedcdd15724967c946a498b1ebff3b5cc76fa.zip
Design colors
Diffstat (limited to 'src/_functions.scss')
-rw-r--r--src/_functions.scss8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/_functions.scss b/src/_functions.scss
index 07d997b..523aa84 100644
--- a/src/_functions.scss
+++ b/src/_functions.scss
@@ -77,6 +77,11 @@
77 $black-y: iro-colors.apca_sRGB_to_Y(#000); 77 $black-y: iro-colors.apca_sRGB_to_Y(#000);
78 $white-y: iro-colors.apca_sRGB_to_Y(#fff); 78 $white-y: iro-colors.apca_sRGB_to_Y(#fff);
79 79
80 $chroma-inv: false;
81 @if $chroma-range < 0 {
82 $chroma-inv: true;
83 $chroma-range: -1 * $chroma-range;
84 }
80 $chroma-easing: meta.get-function(config.$palette-chroma-easing, $module: easing); 85 $chroma-easing: meta.get-function(config.$palette-chroma-easing, $module: easing);
81 86
82 $palette: (); 87 $palette: ();
@@ -94,6 +99,9 @@
94 99
95 @if $chroma-range != 1 { 100 @if $chroma-range != 1 {
96 $c: if($ref-l > 50%, math.clamp(0, math.div($contrast, $cmax), 1), -1 * math.clamp(-1, math.div($contrast, $cmax), 0)); 101 $c: if($ref-l > 50%, math.clamp(0, math.div($contrast, $cmax), 1), -1 * math.clamp(-1, math.div($contrast, $cmax), 0));
102 @if $chroma-inv {
103 $c: 1 - $c;
104 }
97 $c: meta.call($chroma-easing, $c); 105 $c: meta.call($chroma-easing, $c);
98 $c: $chroma-range + (1 - $chroma-range) * $c; 106 $c: $chroma-range + (1 - $chroma-range) * $c;
99 } 107 }