jscolor拾色器插件,不显示颜色选择器与颜色数值代码,以及一般配置

jscolor拾色器插件,不显示颜色选择器与颜色数值代码,以及一般配置

修改jscolor.js文件中对应属性:this.showOnClick 、this.valueElement

this.valueElement = false; // 不显示颜色代码
this.showOnClick = false; // 单击后不显示颜色选择器

//基本配置
		this.value = null; // 最初的十六进制颜色。要在以后修改它,可以使用fromString()、fromHSV()和fromRGB()方法
		this.valueElement = targetElement; // 显示颜色代码
		this.styleElement = targetElement; // 使用CSS backgroundColor预览选中的颜色
		this.required = true; //  关联的文本<input>是否可以留空
		this.refine = true; // 是否要细化输入的颜色代码(例如大写字母和删除空白)
		this.hash = false; // 是否在十六进制颜色代码前面加上#符号
		this.uppercase = true; // 是否用大写字母显示颜色代码
		this.onFineChange = null; // 每次颜色改变时立即调用(值可以是函数,也可以是带有javascript代码的字符串)
		this.activeClass = 'jscolor-active'; // 在其上打开选择器窗口时将其设置为目标元素
		this.overwriteImportant = false; // 是否覆盖styleElement的颜色使用!重要
		this.minS = 0; // 最小允许饱和度(0 - 100)
		this.maxS = 100; // 最大允许饱和度(0 - 100)
		this.minV = 0; // 最小允许值(亮度)(0 - 100)
		this.maxV = 100; // 最大允许值(亮度)(0 - 100)
		
		this.hsv = [0, 0, 100]; // 只读  [0-360, 0-100, 0-100]
		this.rgb = [255, 255, 255]; // 只读  [0-255, 0-255, 0-255]

		
		this.width = 181; // 调色板宽度(px)
		this.height = 101; // 调色板高度(px)
		this.showOnClick = false; // 是否在用户单击其目标元素时显示颜色选择器
		this.mode = 'HSV'; // HSV | HVS | HS | HV -  颜色选择器控件的布局
		this.position = 'bottom'; // left | right | top | bottom - position 相对于目标元素的位置
		this.smartPosition = true; // 当没有足够的空间放置拾取器时,自动改变拾取器的位置
		this.sliderSize = 16; 
		this.crossSize = 8; 
		this.closable = false; //  是否显示关闭按钮
		this.closeText = 'Close';
		this.buttonColor = '#000000'; 
		this.buttonHeight = 18; 
		this.padding = 12;
		this.backgroundColor = '#FFFFFF'; 
		this.borderWidth = 1; 
		this.borderColor = '#BBBBBB'; 
		this.borderRadius = 8; 
		this.insetWidth = 1;
		this.insetColor = '#BBBBBB'; 
		this.shadow = true; //  是否显示阴影
		this.shadowBlur = 15; 
		this.shadowColor = 'rgba(0,0,0,0.2)'; 
		this.pointerColor = '#4C4C4C'; 
		this.pointerBorderColor = '#FFFFFF'; 
        this.pointerBorderWidth = 1; 
        this.pointerThickness = 2; 
		this.zIndex = 1000;
		this.container = null; //  在何处添加颜色选择器(默认为BODY元素)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值