1.0.6 • Published 6 years ago

capturecolor v1.0.6

Weekly downloads
10
License
Apache-2.0
Repository
github
Last release
6 years ago

capturecolor

吸取网页任意位置的颜色,类似 Photoshop 里的吸管工具

install

npm i capturecolor --save

use

const CaptureColor = require('capturecolor')

const capColor = new CaptureColor({
    el: 'app' // 截图对象 DOM 的id, 最好是根节点
})

// 触发截图动作
capColor.pickColor()
.then(res => {
    console.log('所选颜色为', res)
})
.catch(err => {
    console.error(err)
})
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago