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

Skip to content

dctalbot/dominant-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dominant-color

Finding the dominant color of an image is not an easy task. Averaging pixel values turns them to mush. This script simply grabs a random sampling of pixels and reports back the most common rgb color. It's dumb, but it's practical. Some strategies use a color histogram, but more advanced techniques need to consider contrast and focal points in order to provide anything really meaningful. In any case, it's a fun problem to consider and poke at!

About

Get common colors in an image using canvas

Topics

Resources

Stars

Watchers

Forks