-
Notifications
You must be signed in to change notification settings - Fork 85
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 hex support #200
Add hex support #200
Conversation
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! Great idea!
Thank you! |
Tbh I don't understand the semver issue, I didn't add or change any |
No worries, you didn't do anything wrong. It reports a failure whenever the semver is not bumped appropriately from the last release, as far as I understand it. So it will almost always fail on new feature PRs, since we don't bump the version until right before release. Or, more accurately, bumping the version triggers a release, so we can't bump it until we're ready to release. |
Because we assert length, we can index directly into strings. Also, since we're already checking for the string to start with `#`, we can drop that first character so simplify parsing.
Add support for hex strings (
"#abc"
or"#abcdef"
) in place of color names when using.color(...)
. For exampleThe case of the hex string is ignored. If an invalid hex string is passed (including missing
#
), the color defaults to white.