diff --git a/README.markdown b/README.markdown index ddc2de7..b17908f 100644 --- a/README.markdown +++ b/README.markdown @@ -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.