color-finder
color-finder copied to clipboard
Future plans
Hi,
I checked the demo page and it seems promising. I was just wondering what is your plan about this library. Are you still maintaining? Are you going to add any features? etc.
Well, the lib works fine for me and I don't see any maintenance needed there. If a bug/problem is reported I'll (try to) fix it but that's about it. I really have no plans for this.
Did you think of anything in particular?
I would love to add bower, cdnjs, and minification (grunt) support to make it very easy to import in the project.
Also check out the following code:
this.getMostProminentColor = function(imgEl) {
var rgb = null;
if (!this.callback) this.callback = function() { return 1; };
var data = this.getImageData(imgEl);
rgb = this.getMostProminentRGBImpl(data, 6, rgb, this.callback);
rgb = this.getMostProminentRGBImpl(data, 4, rgb, this.callback);
rgb = this.getMostProminentRGBImpl(data, 2, rgb, this.callback);
rgb = this.getMostProminentRGBImpl(data, 0, rgb, this.callback);
return rgb;
};
The value of the data is null (var data = this.getImageData(imgEl);) if the image is hosted on the server side as it is in my case. Why not return at that point of the data is null instead of keep going and executing getMostProminentRGBImpl?
Thanks.
Edit: I can send a pull request if you want.
Oh, for integration in various code source indexes I'll accept any pull request you want. You're also welcome to send me pull request for code hardening / improvement.