mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
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:
@@ -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 ----
|
||||
|
||||
@@ -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%)
|
||||
|
||||
Reference in New Issue
Block a user