more readme updates

This commit is contained in:
Lokesh Dhakar
2011-11-03 17:59:36 -04:00
parent 13a6adffec
commit d3f5fbb2ae

View File

@@ -11,14 +11,18 @@ A script for grabbing the dominant color or a representative color palette from
###Usage
####getDominantColor(sourceImage)
```js
getDominantColor(sourceImage)
returns {r: num, g: num, b: num}
```
Use the median cut algorithm provided by quantize.js to cluster similar
colors and return the base color from the largest cluster.
####createPalette(sourceImage, colorCount)
```js
createPalette(sourceImage, colorCount)
returns array[ {r: num, g: num, b: num}, {r: num, g: num, b: num}, ...]
```
Use the median cut algorithm provided by quantize.js to cluster similar
colors.