mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 08:17:12 -06:00
Accent color: fixed text colors if using light accent color
(issue #233)
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
@background = #3c3f41
|
@background = #3c3f41
|
||||||
@foreground = #bbb
|
@foreground = #bbb
|
||||||
@selectionBackground = @accentSelectionBackground
|
@selectionBackground = @accentSelectionBackground
|
||||||
@selectionForeground = @foreground
|
@selectionForeground = contrast(@selectionBackground,@background,@foreground,39%)
|
||||||
@selectionInactiveBackground = spin(saturate(shade(@selectionBackground,70%),20%),-15)
|
@selectionInactiveBackground = spin(saturate(shade(@selectionBackground,70%),20%),-15)
|
||||||
@selectionInactiveForeground = @foreground
|
@selectionInactiveForeground = @foreground
|
||||||
@disabledText = #888
|
@disabledText = #888
|
||||||
@@ -100,7 +100,7 @@ Button.hoverBorderColor = $Button.focusedBorderColor
|
|||||||
Button.innerFocusWidth = 1
|
Button.innerFocusWidth = 1
|
||||||
|
|
||||||
Button.default.background = @accentButtonDefaultBackground
|
Button.default.background = @accentButtonDefaultBackground
|
||||||
Button.default.foreground = @foreground
|
Button.default.foreground = contrast($Button.default.background,@background,@foreground,25%)
|
||||||
Button.default.hoverBackground = lighten($Button.default.background,3%,derived)
|
Button.default.hoverBackground = lighten($Button.default.background,3%,derived)
|
||||||
Button.default.pressedBackground = lighten($Button.default.background,6%,derived)
|
Button.default.pressedBackground = lighten($Button.default.background,6%,derived)
|
||||||
Button.default.borderColor = tint($Button.default.background,15%)
|
Button.default.borderColor = tint($Button.default.background,15%)
|
||||||
@@ -240,8 +240,8 @@ PopupMenu.borderColor = #5e5e5e
|
|||||||
|
|
||||||
ProgressBar.background = #555
|
ProgressBar.background = #555
|
||||||
ProgressBar.foreground = @accentSliderColor
|
ProgressBar.foreground = @accentSliderColor
|
||||||
ProgressBar.selectionForeground = @foreground
|
|
||||||
ProgressBar.selectionBackground = @foreground
|
ProgressBar.selectionBackground = @foreground
|
||||||
|
ProgressBar.selectionForeground = contrast($ProgressBar.foreground,@background,@foreground,39%)
|
||||||
|
|
||||||
|
|
||||||
#---- RootPane ----
|
#---- RootPane ----
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
@background = #f2f2f2
|
@background = #f2f2f2
|
||||||
@foreground = #000
|
@foreground = #000
|
||||||
@selectionBackground = @accentSelectionBackground
|
@selectionBackground = @accentSelectionBackground
|
||||||
@selectionForeground = #fff
|
@selectionForeground = contrast(@selectionBackground,@foreground,#fff)
|
||||||
@selectionInactiveBackground = #d4d4d4
|
@selectionInactiveBackground = #d4d4d4
|
||||||
@selectionInactiveForeground = @foreground
|
@selectionInactiveForeground = @foreground
|
||||||
@disabledText = #8C8C8C
|
@disabledText = #8C8C8C
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
@accentSelectionBackground = if(@accentColor, @accentColor, @accentBaseColor)
|
@accentSelectionBackground = if(@accentColor, @accentColor, @accentBaseColor)
|
||||||
@accentSliderColor = if(@accentColor, @accentColor, lighten(saturate(@accentBaseColor,10%),6%))
|
@accentSliderColor = if(@accentColor, @accentColor, lighten(saturate(@accentBaseColor,10%),6%))
|
||||||
@accentUnderlineColor = if(@accentColor, @accentColor, tint(@accentBaseColor,10%))
|
@accentUnderlineColor = if(@accentColor, @accentColor, tint(@accentBaseColor,10%))
|
||||||
|
@accentButtonDefaultBorderColor = if(@accentColor, @accentColor, tint(@accentSliderColor,20%))
|
||||||
|
|
||||||
# for buttons within components (e.g. combobox or spinner)
|
# for buttons within components (e.g. combobox or spinner)
|
||||||
@buttonArrowColor = #666
|
@buttonArrowColor = #666
|
||||||
@@ -105,7 +106,7 @@ Button.default.foreground = @foreground
|
|||||||
Button.default.focusedBackground = $Button.focusedBackground
|
Button.default.focusedBackground = $Button.focusedBackground
|
||||||
Button.default.hoverBackground = darken($Button.default.background,3%,derived)
|
Button.default.hoverBackground = darken($Button.default.background,3%,derived)
|
||||||
Button.default.pressedBackground = darken($Button.default.background,10%,derived)
|
Button.default.pressedBackground = darken($Button.default.background,10%,derived)
|
||||||
Button.default.borderColor = @accentCheckmarkColor
|
Button.default.borderColor = @accentButtonDefaultBorderColor
|
||||||
Button.default.hoverBorderColor = $Button.hoverBorderColor
|
Button.default.hoverBorderColor = $Button.hoverBorderColor
|
||||||
Button.default.focusedBorderColor = $Button.focusedBorderColor
|
Button.default.focusedBorderColor = $Button.focusedBorderColor
|
||||||
Button.default.focusColor = $Component.focusColor
|
Button.default.focusColor = $Component.focusColor
|
||||||
@@ -251,8 +252,8 @@ PopupMenu.borderColor = #adadad
|
|||||||
|
|
||||||
ProgressBar.background = #D1D1D1
|
ProgressBar.background = #D1D1D1
|
||||||
ProgressBar.foreground = @accentSliderColor
|
ProgressBar.foreground = @accentSliderColor
|
||||||
ProgressBar.selectionForeground = @textComponentBackground
|
|
||||||
ProgressBar.selectionBackground = @foreground
|
ProgressBar.selectionBackground = @foreground
|
||||||
|
ProgressBar.selectionForeground = contrast($ProgressBar.foreground,@foreground,@textComponentBackground)
|
||||||
|
|
||||||
|
|
||||||
#---- RootPane ----
|
#---- RootPane ----
|
||||||
|
|||||||
Reference in New Issue
Block a user