diff options
author | Volpeon <git@volpeon.ink> | 2024-10-15 18:06:26 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-10-15 18:06:26 +0200 |
commit | 4ecdedcdd15724967c946a498b1ebff3b5cc76fa (patch) | |
tree | 9e18094acac4854233b74139b0d178ebb08543d9 /src | |
parent | Theme adjustments (diff) | |
download | iro-design-4ecdedcdd15724967c946a498b1ebff3b5cc76fa.tar.gz iro-design-4ecdedcdd15724967c946a498b1ebff3b5cc76fa.tar.bz2 iro-design-4ecdedcdd15724967c946a498b1ebff3b5cc76fa.zip |
Design colors
Diffstat (limited to 'src')
-rw-r--r-- | src/_config.scss | 4 | ||||
-rw-r--r-- | src/_functions.scss | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/_config.scss b/src/_config.scss index 948f919..c827c14 100644 --- a/src/_config.scss +++ b/src/_config.scss | |||
@@ -197,12 +197,12 @@ $theme-dark: ( | |||
197 | ), | 197 | ), |
198 | 198 | ||
199 | --ranges: ( | 199 | --ranges: ( |
200 | --full: 1, | 200 | --full: .4, |
201 | --muted: .3, | 201 | --muted: .3, |
202 | ), | 202 | ), |
203 | 203 | ||
204 | --palettes: ( | 204 | --palettes: ( |
205 | --base: hsl(257, 6%, 18%) --grays --full, | 205 | --base: hsl(257, 15%, 19.5%) --grays --full, |
206 | --blue: oklch(56% .16 265.25) --colors --muted, | 206 | --blue: oklch(56% .16 265.25) --colors --muted, |
207 | --purple: oklch(56% .16 305.58) --colors --muted, | 207 | --purple: oklch(56% .16 305.58) --colors --muted, |
208 | --red: oklch(56% .16 18.69) --colors --muted, | 208 | --red: oklch(56% .16 18.69) --colors --muted, |
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 | } |