Accent color:

- added `Component.accentColor`
- dark themes: changed threshold for contrast() from 39% down to 25% for better readability of text
- Demo: added "Default" accent color and changed "Blue" to lighter color

(issue #233)
This commit is contained in:
Karl Tauber
2021-09-28 11:12:17 +02:00
parent e31e4dfe3a
commit bb5c2eea10
8 changed files with 19 additions and 6 deletions

View File

@@ -35,7 +35,7 @@
@background = #3c3f41
@foreground = #bbb
@selectionBackground = @accentSelectionBackground
@selectionForeground = contrast(@selectionBackground,@background,@foreground,39%)
@selectionForeground = contrast(@selectionBackground,@background,@foreground,25%)
@selectionInactiveBackground = spin(saturate(shade(@selectionBackground,70%),20%),-15)
@selectionInactiveForeground = @foreground
@disabledText = #888
@@ -164,6 +164,7 @@ Component.disabledBorderColor = $Component.borderColor
Component.focusedBorderColor = lighten($Component.focusColor,5%)
Component.focusColor = @accentFocusColor
Component.linkColor = @accentLinkColor
Component.accentColor = if(@accentColor, @accentColor, @accentBaseColor)
Component.grayFilter = -20,-70,100
Component.error.borderColor = desaturate($Component.error.focusedBorderColor,25%)
@@ -242,7 +243,7 @@ PopupMenu.borderColor = #5e5e5e
ProgressBar.background = #555
ProgressBar.foreground = @accentSliderColor
ProgressBar.selectionBackground = @foreground
ProgressBar.selectionForeground = contrast($ProgressBar.foreground,@background,@foreground,39%)
ProgressBar.selectionForeground = contrast($ProgressBar.foreground,@background,@foreground,25%)
#---- RootPane ----

View File

@@ -171,6 +171,7 @@ Component.disabledBorderColor = lighten($Component.borderColor,4%)
Component.focusedBorderColor = shade($Component.focusColor,10%)
Component.focusColor = @accentFocusColor
Component.linkColor = @accentLinkColor
Component.accentColor = if(@accentColor, @accentColor, @accentBaseColor)
Component.grayFilter = 25,-25,100
Component.error.borderColor = lighten(desaturate($Component.error.focusedBorderColor,20%),25%)