tweak dark theme text color

This commit is contained in:
Jakob Pinterits
2024-10-05 18:59:34 +02:00
parent fdd87fe513
commit 11c0c90000

View File

@@ -419,9 +419,11 @@ class Theme:
if text_color is None:
neutral_and_background_text_color = (
# Grey tones look good on bright themes
rio.Color.from_grey(0.3)
if background_color.perceived_brightness > 0.5
else rio.Color.from_grey(0.7)
# ... but not on dark ones. Go very bright here.
else rio.Color.from_grey(0.85)
)
else:
neutral_and_background_text_color = text_color