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

Consider allowing value={pure-color value} and onChange calls back with pure-color value #10

Open
BradHarris opened this issue Nov 10, 2015 · 2 comments

Comments

@BradHarris
Copy link

It would be nice if your color picker used your pure-color value format as a value for input and output instead of rgba string. This would cut down on parsing and converting inside the color picker and would allow users to use your pure-color lib to manage formats how they need to outside of the color picker.

I realize this would break the current API but tis only a suggestion.

@WickyNilliams
Copy link
Owner

You mean an array like [r, g, b, a]?

I've considered this a few times. I may even have a branch locally where I've done this. Though I can't remember why I never settled on it? I'll think about it again :)

Are you having perf issues, or is this just an idea?

@BradHarris
Copy link
Author

Just an idea, there are no performance issues but currently the data is going through this transformation:
data -> convert to rgbastring -> color-picker -> parse to pure-color -> change happens -> convert to rgbastring -> calback with rgbastring -> parse rgbastring -> convert to data

it could be
data -> convert to pure-color -> color-picker -> change happens -> -> calback with pure-color -> convert to data

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