-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configurable colored systems #16
Add configurable colored systems #16
Conversation
If `None` is provided a default implementation with a default color set is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this! I agree that this looks a lot better and more readable. I left a few comments the PR looks mostly good to go.
src/schedule_graph/settings.rs
Outdated
let is_dark = l < 0.6; | ||
|
||
// Calculate text color based on bg | ||
let text_color = style |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the values for light/dark text (see 5060fad). I'm not going full white/black to preserve some of the hue from the background. This should improve readability a little bit while still preserving the tint.
Although, the real issue is to find a good way to decide if I should use white or black text. Right now I'm doing it based on the background luminance (is_dark = luminance < 0.6
); which is probably a naive approach, see: https://ux.stackexchange.com/q/107318
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-Authored-By: Jakob Hellermann <jakob.hellermann@protonmail.com>
Co-Authored-By: Jakob Hellermann <jakob.hellermann@protonmail.com>
Co-Authored-By: Jakob Hellermann <jakob.hellermann@protonmail.com>
Settings.system_style
option, which allows to pass aSystem => Style
mapper to decide how to style a single system node.None
is given (default behavior) a predefined set of colors are appliedFixes #13
Examples
Current color palette
I've it on a Figma file, I can create a standalone file and share it if you want.