2
0
mirror of https://github.com/PitPik/colorPicker.git synced 2025-07-31 22:04:30 -06:00

Update README.md

This commit is contained in:
Peter Dematté 2014-08-06 17:43:07 +02:00
parent ea0b438ab5
commit ded52f929e

View File

@ -15,6 +15,8 @@ All the W3C 2.0 calculations for readability are also based on opacity levels of
Supported color spaces are: (* also displayed as colors in realtime)<br> Supported color spaces are: (* also displayed as colors in realtime)<br>
rgb *, hsv(b) *, hsl *, cmyk, cmy, Lab, XYZ, HEX rgb *, hsv(b) *, hsl *, cmyk, cmy, Lab, XYZ, HEX
##How to use Color.js
```javascript ```javascript
var myColors = new Colors({ // all options have a default value... var myColors = new Colors({ // all options have a default value...
color: 'rgba(204, 82, 37, 0.8)', // initial color (#RGB, RGB, #RRGGBB, RRGGBB, rgb(r, g, b), ...) color: 'rgba(204, 82, 37, 0.8)', // initial color (#RGB, RGB, #RRGGBB, RRGGBB, rgb(r, g, b), ...)
@ -28,6 +30,7 @@ var myColors = new Colors({ // all options have a default value...
allMixDetails: false // if set to true, Colors deliveres some more mixed layer informations for all color layers allMixDetails: false // if set to true, Colors deliveres some more mixed layer informations for all color layers
}); });
``` ```
##How to use colorPicker.js
colorPicker uses an instance of Colors and passes the options to it, so some values are the same... colorPicker uses an instance of Colors and passes the options to it, so some values are the same...
@ -67,6 +70,8 @@ var myColorPicker = new ColorPicker({
}); });
``` ```
##The color model and more
After initializing Color or ColorPicker you'll get a clean but rhich model of the instance: After initializing Color or ColorPicker you'll get a clean but rhich model of the instance:
```javascript ```javascript