Skip to content

Commit 3b0f554

Browse files
fix: improve blue dark default accent color
1 parent 45b9ea3 commit 3b0f554

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

src/App.vue

+16-14
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,28 @@ export default {
7373

7474
computed: {
7575
appStyle(): { [property: string]: string } {
76-
// Acquire all accent colors (workspace-wide or default)
77-
const accentBackground =
78-
this.account.workspace.accent.background ||
79-
this.$styles.colors.defaultAccentBackground,
80-
accentText =
81-
this.account.workspace.accent.text ||
82-
this.$styles.colors.defaultAccentText;
76+
const accents = this.account.workspace.accent,
77+
defaults = this.$styles.colors;
8378

8479
// Generate actual style
8580
return {
86-
// Accent color (background)
87-
"--color-accent-background-normal":
88-
this.$filters.color.hexVar(accentBackground),
89-
"--color-accent-background-dark": this.$filters.color.darkenVar(
90-
accentBackground,
91-
COLOR_ACCENT_BACKGROUND_DARKEN_RATIO
81+
// Accent color (background, normal)
82+
"--color-accent-background-normal": this.$filters.color.hexVar(
83+
accents.background || defaults.defaultAccentBackgroundNormal
9284
),
9385

86+
// Accent color (background, dark)
87+
"--color-accent-background-dark": accents.background
88+
? this.$filters.color.darkenVar(
89+
accents.background,
90+
COLOR_ACCENT_BACKGROUND_DARKEN_RATIO
91+
)
92+
: this.$filters.color.hexVar(defaults.defaultAccentBackgroundDark),
93+
9494
// Accent color (text)
95-
"--color-accent-text": this.$filters.color.hexVar(accentText)
95+
"--color-accent-text": this.$filters.color.hexVar(
96+
accents.text || defaults.defaultAccentText
97+
)
9698
};
9799
},
98100

src/assets/stylesheets/exports/_exports.colors.module.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
// Defaults
1515

16-
defaultAccentBackground: $color-default-accent-background;
16+
defaultAccentBackgroundNormal: $color-default-accent-background-normal;
17+
defaultAccentBackgroundDark: $color-default-accent-background-dark;
1718
defaultAccentText: $color-default-accent-text;
1819
}

src/assets/stylesheets/variables/_variables.colors.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ $color-text-reverse: #ffffff;
5656

5757
// Defaults
5858

59-
$color-default-accent-background: $color-base-blue-normal;
59+
$color-default-accent-background-normal: $color-base-blue-normal;
60+
$color-default-accent-background-dark: $color-base-blue-dark;
6061
$color-default-accent-text: $color-text-reverse;

0 commit comments

Comments
 (0)