@realign-zone/tiny-color-picker
v0.0.4
Published
A tiny color picker.
Downloads
2
Maintainers
Readme
tiny-color-picker
A tiny color picker.
API
// <script> or import or require
new TinyColorPicker({
el: String, // dom id, only id
oriColor: String, // origin color:hex / rgba
debounce: Number, // debounce delay, unit is ms, max is 5000 ms
offsetX: Number, // X offset, relative to el-X
offsetY: Number, // Y offset, relative to el-Y + el-height
// color change callback
change(cObj = {}, dom) {
// cObj = { hex: '#...', rgba: 'rgba(...)' }
// dom = DOM, inject elDom, as $(`#${el}`)
}
});
Command
# dev 1 + 2
# 1. main dev
$ npm start
# 2. gulp: make template and css
$ npm run gulp
# build
$ npm run build