Open BradHarris opened 8 years ago
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?
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
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.