From d3f5fbb2ae8152b3880aca507e2735d0af8e6ef5 Mon Sep 17 00:00:00 2001 From: Lokesh Dhakar Date: Thu, 3 Nov 2011 17:59:36 -0400 Subject: [PATCH] more readme updates --- README.markdown | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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.