Copyright 2011 Cory LaViska for A Beautiful Site, LLC. (http://abeautifulsite.net/)
Dual licensed under the MIT / GPLv2 licenses
http://labs.abeautifulsite.net/jquery-miniColors/
- Link to jQuery:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- Link to miniColors:
<script type="text/javascript" src="jquery.miniColors.js"></script>
- Include miniColors stylesheet:
<link type="text/css" rel="stylesheet" href="jquery.miniColors.css" />
- Apply $([selector]).miniColors() to one or more INPUT elements
- disabled [true,false] - Disables the control on init
- readonly [true,false] - Makes the control read-only on init
$([selector]).miniColors({
optionName: value,
optionName: value,
...
});
Methods are called using this syntax:
$([selector]).miniColors('methodName', [value]);
- letterCase [uppercase|lowercase|null] - forces the hex value into upper or lowercase
- disabled [true|false] - sets the disabled status
- readonly [true|false] - sets the readonly status
- value (none) - gets the current value; guaranteed to return a valid hex color
- value [hex value] - sets the control's value
- destroy (none)
- change(hex, rgb) - called when the color value changes; 'this' refers to the original input element
$([selector]).miniColors({
change: function(hex, rgb) { ... }
});
- The color picker icon is based on an icon from the amazing Fugue icon set: http://p.yusukekamiyamane.com/
- The gradient image, the hue image, and the math functions are courtesy of the eyecon.co jQuery color picker: http://www.eyecon.ro/colorpicker/