color-finder icon indicating copy to clipboard operation
color-finder copied to clipboard

Future plans

Open ilovecoffee opened this issue 11 years ago • 3 comments
trafficstars

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.

ilovecoffee avatar Oct 08 '14 18:10 ilovecoffee

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?

pieroxy avatar Oct 09 '14 07:10 pieroxy

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.

ilovecoffee avatar Oct 10 '14 16:10 ilovecoffee

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.

pieroxy avatar Oct 10 '14 19:10 pieroxy