go-colorweave

command module
v0.0.0-...-973e65b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2016 License: MIT Imports: 10 Imported by: 0

README

go-colorweave

Extracting dominant color palette from an image

This program extracts the top N dominant colors from an image and display as output, where N can be set by the user. It uses standard image library, resize library and webcolors library. Along with the colors, the program also shows the percentage of the color in the given image. By default, the code displays the color name using CSS 2.1 specifications, but this can be also changes to CSS 3 colors which has wider variety (140) colors.

By default the program takes the test.jpg file in directory. However, it can be changed to any image file.

With the 2 external packages installed, the code can be executed as following:

go run go-colorweave.go

Example

The following image has been used as example:

The program will give the following output when used agains the image above:

green 26.77%
silver 19.77%
olive 16.79%
grey 14.47%
aqua 11.01%

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL