图片颜色获取 | ColorPick Example

|
ColorChange Example
img
background
video
Try it
                    
    <img class="cc img1" src="./img/1.jpeg" />
                    
                

    import {ColorPick} from 'color-change'
    var cp = new ColorPick('.img1')

    // Note : return is Promise 
    // demo 1
    await cp.getColor()
    
    // demo 2
    cp.getColors(3).then((colors)=>{    })