Skip to content
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

Allow 3- and 4-digit hex colors #352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milkey-mouse
Copy link
Contributor

These are common enough (especially on the web) that a new user might try to use a 3-digit hex color such as #f00 (or one with transparency such as #f008). We might as well make this work and save a few seconds of confusion/RTFM.

Also, print the "Invalid color" message if the color string is of an allowed length, but not parseable as a hex color (example: #bruh). No reason to be as lenient as HTML.

These are common enough (especially on the web) that a new user might
try to use a 3-digit hex color such as #f00 (or one with transparency
such as #f008). We might as well make this work and save a few seconds
of confusion/RTFM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant