Skip to content

Commit

Permalink
fix: make the color less depressed
Browse files Browse the repository at this point in the history
https://codyhouse.co/ds/globals/colors

BREAKING CHANGE: config.toml changed

Please change `primaryColorDark` to `201, 65%, 62%` by yourself.
  • Loading branch information
reuixiy committed Nov 4, 2019
1 parent ad3f9d1 commit 4c37e04
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ duration = 0.5
# HSL 颜色值
primaryColorLight = "220, 90%, 56%"
# 深色模式的主色
primaryColorDark = "349, 75%, 51%"
primaryColorDark = "201, 65%, 62%"

# 文章的内容宽度
# 如果为空(""),则用 42 作为默认值
Expand Down
12 changes: 6 additions & 6 deletions assets/scss/_variables/dark.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[data-theme="dark"] {
@include defineColorHSL(--color-primary, $primaryColorDarkH, $primaryColorDarkS, $primaryColorDarkL);
@include defineColorHSL(--color-bg, 0, 0%, 10%);
@include defineColorHSL(--color-contrast-lower, 0, 0%, 15%);
@include defineColorHSL(--color-contrast-low, 0, 0%, 40%);
@include defineColorHSL(--color-contrast-medium, 0, 0%, 60%);
@include defineColorHSL(--color-contrast-high, 0, 0%, 80%);
@include defineColorHSL(--color-contrast-higher, 0, 0%, 90%);
@include defineColorHSL(--color-bg, 240, 8%, 12%);
@include defineColorHSL(--color-contrast-lower, 240, 6%, 19%);
@include defineColorHSL(--color-contrast-low, 240, 3%, 27%);
@include defineColorHSL(--color-contrast-medium, 240, 1%, 57%);
@include defineColorHSL(--color-contrast-high, 0, 0%, 89%);
@include defineColorHSL(--color-contrast-higher, 0, 0%, 100%);
}
8 changes: 4 additions & 4 deletions assets/scss/_variables/light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
@include defineColorHSL(--color-primary, $primaryColorLightH, $primaryColorLightS, $primaryColorLightL);
@include defineColorHSL(--color-bg, 0, 0%, 100%);
@include defineColorHSL(--color-contrast-lower, 0, 0%, 95%);
@include defineColorHSL(--color-contrast-low, 0, 0%, 80%);
@include defineColorHSL(--color-contrast-medium, 0, 0%, 40%);
@include defineColorHSL(--color-contrast-high, 0, 0%, 20%);
@include defineColorHSL(--color-contrast-higher, 0, 0%, 10%);
@include defineColorHSL(--color-contrast-low, 240, 1%, 83%);
@include defineColorHSL(--color-contrast-medium, 240, 1%, 48%);
@include defineColorHSL(--color-contrast-high, 240, 4%, 20%);
@include defineColorHSL(--color-contrast-higher, 240, 8%, 12%);
}

// return css color variable with different opacity value
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
@import "_variables/light.scss";

{{ if .Site.Params.enableDarkMode }}
{{ with .Site.Params.primaryColorDark | default "349, 75%, 51%" }}
{{ with .Site.Params.primaryColorDark | default "201, 65%, 62%" }}
{{ $number := (split (replace . "%" "") ", ") }}
{{ range $index, $value := $number }}
{{ if eq $index 0 }}
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ duration = 0.5

# HSL color
primaryColorLight = "220, 90%, 56%"
primaryColorDark = "349, 75%, 51%"
primaryColorDark = "201, 65%, 62%"

# Unit: em
# You can leave it empty ("") to fallback to default value: 42
Expand Down

0 comments on commit 4c37e04

Please sign in to comment.