diff options
author | Volpeon <git@volpeon.ink> | 2022-02-08 07:22:14 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-02-08 07:22:14 +0100 |
commit | a4bac6daabb6a142cf9cc08f158898a4b5ba5b38 (patch) | |
tree | 46d3a851ac94cefa4b7070b696ff07bef870e343 | |
parent | Use HSLuv for accents (diff) | |
download | iro-design-a4bac6daabb6a142cf9cc08f158898a4b5ba5b38.tar.gz iro-design-a4bac6daabb6a142cf9cc08f158898a4b5ba5b38.tar.bz2 iro-design-a4bac6daabb6a142cf9cc08f158898a4b5ba5b38.zip |
Use LCH colors
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/_vars.scss | 17 | ||||
-rw-r--r-- | yarn.lock | 10 |
3 files changed, 14 insertions, 15 deletions
diff --git a/package.json b/package.json index b41b8d5..0a8a966 100644 --- a/package.json +++ b/package.json | |||
@@ -18,7 +18,7 @@ | |||
18 | "serve": "python -m http.server --bind 127.0.0.1 --directory public 8000" | 18 | "serve": "python -m http.server --bind 127.0.0.1 --directory public 8000" |
19 | }, | 19 | }, |
20 | "dependencies": { | 20 | "dependencies": { |
21 | "hsluv-sass": "^2.0.1", | 21 | "@oddbird/blend": "^0.2.3", |
22 | "include-media": "^1.4.9", | 22 | "include-media": "^1.4.9", |
23 | "iro-sass": "git+https://git.vulpes.one/git/iro-sass.git" | 23 | "iro-sass": "git+https://git.vulpes.one/git/iro-sass.git" |
24 | }, | 24 | }, |
diff --git a/src/_vars.scss b/src/_vars.scss index a9ca9bf..e838a82 100644 --- a/src/_vars.scss +++ b/src/_vars.scss | |||
@@ -1,6 +1,6 @@ | |||
1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
2 | @use 'include-media/dist/include-media' as media; | 2 | @use 'include-media/dist/include-media' as media; |
3 | @use 'hsluv-sass/src/hsluv' as hsluv; | 3 | @use '@oddbird/blend'; |
4 | @use 'functions' as fn; | 4 | @use 'functions' as fn; |
5 | 5 | ||
6 | iro.$vars-root-size: 16px; | 6 | iro.$vars-root-size: 16px; |
@@ -88,11 +88,10 @@ media.$unit-intervals: ( | |||
88 | 88 | ||
89 | @function accent-palette($base) { | 89 | @function accent-palette($base) { |
90 | @return ( | 90 | @return ( |
91 | --hi: scale-color($base, $lightness: 15%), | 91 | --hi: blend.scale($base, $lightness: 15%, $chroma: 20%), |
92 | --main: $base, | 92 | --main: $base, |
93 | --lo: scale-color($base, $lightness: -15%), | 93 | --lo: blend.scale($base, $lightness: -15%), |
94 | --lo2: scale-color($base, $lightness: -25%), | 94 | --lo2: blend.scale($base, $lightness: -25%), |
95 | --semi: rgba($base, .4), | ||
96 | --selection: rgba($base, .99), | 95 | --selection: rgba($base, .99), |
97 | --fg: #fff, | 96 | --fg: #fff, |
98 | ); | 97 | ); |
@@ -116,10 +115,10 @@ media.$unit-intervals: ( | |||
116 | --fg-lo: fn.color(--gray11, null), // Strong text | 115 | --fg-lo: fn.color(--gray11, null), // Strong text |
117 | 116 | ||
118 | --accent: ( | 117 | --accent: ( |
119 | --blue: accent-palette(hsluv.hsluv(259, 68.1%, 47.7%)), | 118 | --blue: accent-palette(blend.lch(48% 50 279)), |
120 | --red: accent-palette(hsluv.hsluv(0, 68.1%, 47.7%)), | 119 | --red: accent-palette(blend.lch(48% 50 23)), |
121 | --green: accent-palette(hsluv.hsluv(131, 68.1%, 47.7%)), | 120 | --green: accent-palette(blend.lch(58% 50 141)), |
122 | --yellow: accent-palette(hsluv.hsluv(78, 68.1%, 47.7%)), | 121 | --yellow: accent-palette(blend.lch(73% 50 90)), |
123 | 122 | ||
124 | --primary: iro.props-ref('colors', --colors --accent --blue), | 123 | --primary: iro.props-ref('colors', --colors --accent --blue), |
125 | --error: iro.props-ref('colors', --colors --accent --red), | 124 | --error: iro.props-ref('colors', --colors --accent --red), |
@@ -66,6 +66,11 @@ | |||
66 | "@nodelib/fs.scandir" "2.1.5" | 66 | "@nodelib/fs.scandir" "2.1.5" |
67 | fastq "^1.6.0" | 67 | fastq "^1.6.0" |
68 | 68 | ||
69 | "@oddbird/blend@^0.2.3": | ||
70 | version "0.2.3" | ||
71 | resolved "https://registry.yarnpkg.com/@oddbird/blend/-/blend-0.2.3.tgz#06408addb6acb4ef2a33affd484255e121ad5f23" | ||
72 | integrity sha512-P3MYNqeWTQ4RZdmRDOigxpcUK+pvqr+aTzHYnHxF84xmf/1quhCpbTsWZE6TPUifSQ346Cf+e4j0Zgn3fIUmSQ== | ||
73 | |||
69 | "@types/babel-types@*", "@types/babel-types@^7.0.0": | 74 | "@types/babel-types@*", "@types/babel-types@^7.0.0": |
70 | version "7.0.11" | 75 | version "7.0.11" |
71 | resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.11.tgz#263b113fa396fac4373188d73225297fb86f19a9" | 76 | resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.11.tgz#263b113fa396fac4373188d73225297fb86f19a9" |
@@ -1175,11 +1180,6 @@ hosted-git-info@^4.0.1: | |||
1175 | dependencies: | 1180 | dependencies: |
1176 | lru-cache "^6.0.0" | 1181 | lru-cache "^6.0.0" |
1177 | 1182 | ||
1178 | hsluv-sass@^2.0.1: | ||
1179 | version "2.0.1" | ||
1180 | resolved "https://registry.yarnpkg.com/hsluv-sass/-/hsluv-sass-2.0.1.tgz#141368a4d08cd72cd3a156a1a5251e68ea0db2a4" | ||
1181 | integrity sha512-dBWTq11yV3qcJHkMJQIR4u5/LtfllyIKfVCS/qMjBIlNHQqbyMWjWTby+WnjzAyQsZYPR8e/dC6dVKoaYhvyzA== | ||
1182 | |||
1183 | html-tags@^3.1.0: | 1183 | html-tags@^3.1.0: |
1184 | version "3.1.0" | 1184 | version "3.1.0" |
1185 | resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140" | 1185 | resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140" |