-
Notifications
You must be signed in to change notification settings - Fork 3
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 a color limiter option #5
Conversation
Maybe instead of subjective bounds we could use something like sinebow or cube helix rainbow to ensure all hues have the same perceptual brightness and build upon that? Edit: Actually nevermind, it's not exactly uniform with respect to L 🤔 It just seems that a better approach would be given a hue to calculate other values in a way that gives us predictable L, whatever hue we choose |
@AlexanderBelokon to-color is already pretty subjective with respect to bounds. I'd prefer this implementation to be a starting place that we can rethink/improve on? |
@AlexanderBelokon instead of halving the hue, let's try calling |
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.
Love it! I think this is likely the most elegant way to handle the problem ✨
This PR adds a new
limit
option that limits the hue range of a color passed.The goal is to combat issues where blue in particular - which natively has low luminance - has poor contrast against dark colors: