Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh committed Nov 3, 2011
1 parent 8bf268e commit 42f0c4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ by Lokesh Dhakar - [Blog](http://lokeshdhakar.com) - [Twitter](http://twitter.co

A script for grabbing the dominant color or a representative color palette from an image. Uses javascript and canvas.

## [Demo](http://lokeshdhakar.com/projects/color-thief)
### [Demo](http://lokeshdhakar.com/projects/color-thief)

##Requirements
###Requirements
* jQuery
* quantize.js

##Usage
###Usage

###getDominantColor(sourceImage)
####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)
####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
Expand Down

0 comments on commit 42f0c4f

Please sign in to comment.