-
Notifications
You must be signed in to change notification settings - Fork 922
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
Cant type in 4 or 8 letter color names in editable input anymore #552
Comments
I wonder if we need to revert the fix in that commit and find another solution for the problem that was solving. |
@casesandberg What do you think about having a list with the available colors ( |
@Tintef That would be a workaround but not a fix for the problem. We want to support all valid hexadecimal strings including alpha values and hexadecimal numbers. |
@casesandberg I'd like to propose using https://www.npmjs.com/package/validate-color to validate colours passed directly in the input. This package currently supports:
Disclaimer though, this package is mine. Having said that, I wrote exhaustive tests on each function, that can be run separately or combined in one (ie. |
On the react color demo page I am able to type in "blue" into any of the editable inputs and that is recognized as valid.
Since this fix - 669bf04#diff-012ff5a8f8316a2507102ec918eaf81b
I am not able to type in 4 or 8 letter color names. They return as invalid because of the length check. So while "red" or "yellow" works fine, "blue" or "gray" doesnt.
Is there a work around for this?
The text was updated successfully, but these errors were encountered: