html5kellycolorpicker是一个简单而独立的颜色选择器JavaScript库,用于呈现画布,HSV颜色拾取。创建一个html5画布颜色拾取input基础调用new KellyColorPicker({ place : 'picker', input : 'color' });更多配置参数new KellyColorPicker({ // 画布大小 size: 200, // 默认颜色 color: '#ffffff', // or 'quad' method: 'triangle', //input颜色 inputColor: true, // hex or rgba inputFormat: 'mixed', // 从0 至 1 alpha: 1, // 显示滑块 alphaSlider: false, // 自适用窗口 resizeWith: true });一些事件new KellyColorPicker({ userEvents: { updateinput : function(handler, input, manualEnter) {}, change : function(handler) {}, mousemoveh : function(event, handler, dot) {}, mouseuph : function(event, handler, dot) {}, mousemovesv : function(event, handler, dot) {}, mouseupsv : function(event, handler, dot) {}, mousemoverest : function(event, handler, dot) {}, mouseupalpha : function(event, handler, dot) {}, mousemovealpha : function(event, handler, dot) {}, setmethod : function (handler, newMethod) {}, selectcolorsaver : function (handler, colorSaverObj) {}, } });API方法instance.setColorByHex(hex) instance.setColor(color) instance.setColorForColorSaver(color, side) instance.setColorSaver(side) // side - "left" or "right" instance.getColorSaver(side) instance.addUserEvent(eventKey, event) instance.removeUserEvent(eventKey) instance.getCanvas() instance.getCtx() instance.getInput() instance.getSvFig() instance.getSvFigCursor() instance.getWheel() instance.getWheelCursor() instance.getCurColorHsv() instance.getCurColorRgb() instance.getCurColorHex() instance.getCurColorRgba() instance.getCurAlpha instance.setAlpha(newAlpha) instance.updateView(dropBuffer) instance.resize(newSize) instance.destroy()
文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)