From fed4154d2921761bb1cfef7b3f9c24322b3c126e Mon Sep 17 00:00:00 2001 From: Lokesh Dhakar Date: Thu, 2 May 2019 08:23:32 -0700 Subject: [PATCH] docs: Add API table --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8b206b5..cedfd3c 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,12 @@ A script for grabbing the color palette from an image. Uses Javascript and the c ## How to use ### Get the dominant color from an image + ```js var colorThief = new ColorThief(); colorThief.getColor(sourceImage); ``` -```js -getColor(sourceImage[, quality]) -returns [num, num, num] -``` - ### Build a color palette from an image In this example, we build an 8 color palette. @@ -27,7 +23,10 @@ var colorThief = new ColorThief(); colorThief.getPalette(sourceImage, 8); ``` -```js -getPalette(sourceImage[, colorCount, quality]) -returns [ [num, num, num], [num, num, num], ... ] -``` +### API + + +| Method | Return | Description | +| --- | --- | --- | +| `getColor(image [, quality])` | `[Number, Number, Number]` | WIP | +| `getPalette(image [, colorCount, quality]` | `[[Number, Number, Number], ...]` | WIP |