Answers for "js analyse img color"

0

js analyse img color

var vibrant = new Vibrant("https://api.deezer.com/album/97504/image");
    var swatches = vibrant.swatches()
    for (var swatch in swatches)
        if (swatches.hasOwnProperty(swatch) && swatches[swatch])
            console.log(swatch, swatches[swatch].getHex())

    /*
     * Results into:
     * Vibrant #7a4426
     * Muted #7b9eae
     * DarkVibrant #348945
     * DarkMuted #141414
     * LightVibrant #f3ccb4
     */
Posted by: Guest on December-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language