utils

package
v0.0.0-...-0025597 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProminentColors

func GetProminentColors(imageContent io.Reader, palette Palette) ([]string, error)

GetProminentColors takes a Reader and a palette. It reads the image content using the reader and identifies the prominent colors in it which are returned as a slice of string values.

Types

type Palette

type Palette map[string][]uint32

Palette defines a palette of colors. It's essentially a map where keys are color names and values is a sequence of 3 RGB uint32 values

func GetDefaultPalette

func GetDefaultPalette() *Palette

GetDefaultPalette returns a default palette

Jump to

Keyboard shortcuts

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