Sorry, I am a bit newbisch and trying to implement ngColorThief in a Ionic project. I am adding
app.config(function ($colorThiefProvider) {
// Set the default quality
$colorThiefProvider.setDefaultQuality(50);
// Set the default palette color count
$colorThiefProvider.setDefaultColorCount(4);
// Set wether to return arrays (ColorThief's default) or
// objects like {r: 242, g: 124, b: 91} (false by default).
$colorThiefProvider.setReturnObjects(true);
});
in my app.js file. So far so good, but when I am adding this to my controllers.js I am getting only errors:
app.controller('MyCtrl', function ($colorThief) {
var image = /*...*/;
var dominant = $colorThief.getColor(image);
var palette = $colorThief.getPalette(image);
});
Sorry for my ignorance but what is this:
var image = /*...*/;
Would it be possible to provide a short but complete example?
Thanks!
Sorry, I am a bit newbisch and trying to implement ngColorThief in a Ionic project. I am adding
in my app.js file. So far so good, but when I am adding this to my controllers.js I am getting only errors:
Sorry for my ignorance but what is this:
var image = /*...*/;Would it be possible to provide a short but complete example?
Thanks!