2
0
mirror of https://github.com/PitPik/colorPicker.git synced 2025-09-08 00:32:35 -06:00

Update README.md

This commit is contained in:
Peter Dematté 2014-08-06 17:47:01 +02:00
parent ded52f929e
commit c02e20d539

View File

@ -15,7 +15,7 @@ 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 ##Colors.js
```javascript ```javascript
var myColors = new Colors({ // all options have a default value... var myColors = new Colors({ // all options have a default value...
@ -30,7 +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.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...
@ -70,14 +70,14 @@ var myColorPicker = new ColorPicker({
}); });
``` ```
##The color model and more ##The color model, the methods 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
Color: { myColors: {
colors: {all kinds of color values...}, colors: { all kinds of color values... },
options: {all the options you set or that are set as default...}, options: { all the options you set or that are set as default... },
__proto__: { // all methods Color uses __proto__: { // all methods Color uses
setColor: function(newCol, type, alpha) {}, setColor: function(newCol, type, alpha) {},
getColor: function(type) {}, getColor: function(type) {},
@ -89,12 +89,13 @@ Color: {
``` ```
```javascript ```javascript
ColorPicker: { myColorPicker: {
color: { // instance of Color inside colorPicker color: { // instance of Color inside colorPicker
colors: {all kinds of color values...}, colors: { all kinds of color values... },
options: {all the options you set or that are set as default...} options: { all the options you set or that are set as default... },
__proto__: { all methods Color uses ... }
}, },
nodes: {all kinds of cashed nodes, textNodes and styles, etc...}, nodes: { all kinds of cashed nodes, textNodes and styles, etc... },
__proto__: { // all methods ColorPicker uses __proto__: { // all methods ColorPicker uses
setColor: function(newCol, type, alpha, forceRender) {}, setColor: function(newCol, type, alpha, forceRender) {},
startRender: function(oneTime) {}, startRender: function(oneTime) {},