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

REQUEST: Allow for shorthand HEX (#f0f...) and RGB/RGBA for Input Color #1

Open
edwardsdesign opened this issue Sep 27, 2016 · 1 comment

Comments

@edwardsdesign
Copy link

edwardsdesign commented Sep 27, 2016

Allow for shorthand HEX (#f0f...) and RGB/RGBA for Input Color.

Original: arc90/sass-color-picker

@edwardsdesign edwardsdesign changed the title Allow for shorthand HEX (#f0f...) and RGB/RGBA for Input Color REQUEST: Allow for shorthand HEX (#f0f...) and RGB/RGBA for Input Color Sep 27, 2016
@jimniels
Copy link
Owner

jimniels commented Oct 3, 2016

re: Shorthand Hex

I'm not sure how we'd handle this from a UX perspective.

Right now, on each keypress for the input field, we validate that the character being entered is a valid hexadecimal value. Once that field has 6 characters, the rest of the UI renders (cause we know it's a color).

Allowing shorthand HEX would have to change this. We'd have to do something like require an explicit "Submit" so that when only 3 characters are entered, we still know to go ahead and render the UI. Either that, or setup some kind of keydown timer so that if the user only enters 3 characters and nothing else after like a second or two, we know they meant HEX shorthand, so render based on that.

Suggestions and PRs are welcome for some kind of solution. I may play around with the timer solution if I have the time.

re: RGB/RGBa Input Color

Cool idea, but idk how we'd execute this. Open to suggestions on how we'd do this in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants