colorthief

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMaxCubes = 6

Functions

func GetColor

func GetColor(img image.Image) (color.Color, error)

returns the base color from the image.Image

func GetColorFromFile

func GetColorFromFile(imgPath string) (color.Color, error)

returns the base color from the image file

func GetPalette

func GetPalette(img image.Image, maxCubes int) ([]color.Color, error)

returns cluster similar colors by the median cut algorithm

func GetPaletteFromFile

func GetPaletteFromFile(imgPath string, maxCubes int) ([]color.Color, error)

returns cluster similar colors from the image file

func PrintColor

func PrintColor(colors []color.Color, filename string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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