Package Exports
- @realign-zone/tiny-color-picker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@realign-zone/tiny-color-picker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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