diff --git a/vibrant.js b/vibrant.js index 911cb67..0be33d5 100644 --- a/vibrant.js +++ b/vibrant.js @@ -1,7 +1,11 @@ const Vibrant = require('node-vibrant'); const { path } = require('./utils'); + +const COLOR_COUNT = 256; +const QUALITY = 3; + module.exports = (file) => new Promise((resolve, reject) => - Vibrant.from(path(file.path)).getPalette() - .then((palette) => resolve(palette.Vibrant.hex)) + Vibrant.from(path(file.path)) + .maxColorCount(COLOR_COUNT).quality(QUALITY).getPalette() .catch(reject));