Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tessmore/color-thief

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color Thief

Finds the color palette used in an image.

How to use

Get the dominant color from an image

var colorThief = new ColorThief();
colorThief.getColor(sourceImage);
getColor(sourceImage[, quality])
returns [num, num, num]

Build a color palette from an image

In this example, we build an 8 color palette.

var colorThief = new ColorThief();
colorThief.getPalette(sourceImage, 8);
getPalette(sourceImage[, colorCount, quality])
returns [ [num, num, num], [num, num, num], ... ]

Development

Deploy

Make sure you have parcel installed:

  • Run yarn run build
  • Push to Github repo
  • Create a new Github release along with tag. Naming convention for both v2.8.1

About

Finds the color palette used in an image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.3%
  • CSS 6.1%
  • HTML 3.6%