diff options
Diffstat (limited to 'src/_functions.scss')
| -rw-r--r-- | src/_functions.scss | 8 |
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 | } |
