diff --git a/rio/color.py b/rio/color.py index d2f644de..d5f3cdf8 100644 --- a/rio/color.py +++ b/rio/color.py @@ -508,7 +508,7 @@ class Color(SelfSerializing): darken the color instead. """ # The amount may be negative. If that is the case, delegate to `darker` - if amount <= 0: + if amount < 0: return self.darker(-amount) # HSV has an explicit value for brightness, so convert to HSV and bump @@ -550,7 +550,7 @@ class Color(SelfSerializing): the color instead. """ # The value may be negative. If that is the case, delegate to `brighter` - if amount <= 0: + if amount < 0: return self.brighter(-amount) return Color._map_rgb(self, lambda x: max(x - amount, 0)) diff --git a/rio/theme.py b/rio/theme.py index a5161778..34d60d22 100644 --- a/rio/theme.py +++ b/rio/theme.py @@ -809,7 +809,6 @@ def _create_new_theme( """ Experimental next-gen theme creation function. """ - # Accent palette if accent_color is None: accent_color = rio.Color.from_rgb(red=0.3, green=0.55, blue=0.92) @@ -898,7 +897,11 @@ def _create_new_theme( # Keep the disabled palette subdued. It's not meant to be perfectly # readable - disabled_color = rio.Color.from_grey(0.6) + disabled_color = _derive_color( + neutral_color.desaturated(0.8), + 0.15, + bias_to_bright=-0.3, + ) disabled_palette = Palette( background=disabled_color,