-
Notifications
You must be signed in to change notification settings - Fork 1
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
simplify colors #60
simplify colors #60
Conversation
@sehilyi right now a prop. Thoughts on:
|
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 really like the change you made!
I think the simplified color names are more usable than the previous ones. More understandable and more transparent in terms of how color names are defined. I think it makes sense to at least make these the default color names. I think we can even remove the previous ones.
If we want a user to define their own color names, we can expose a corresponding function:
import { GetColorName } from 'color-hex-to-color-name';
// ...
<AltGoslingComponent
spec={spec}
// user can define their own color names
customColorNames={(hex: string) => GetColorName(hex)}
/>
Co-authored-by: SEHI L'YI <[email protected]>
this PR adds a prop
simplifyColor
. When set totrue
, it will take an approximate color name (from a default list, calculated in RBG space) rather than the most exact with thehex-color-to-color-name
package