palette

package module
v0.0.0-...-3ec3ac1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: Unlicense Imports: 5 Imported by: 0

README

Palette

Go Report Card Build Status Coverage Status

Documentation

A simplified go implementation of the algorithm in the Android support Palette class. You can use this to create a palette of distinct colors from an arbitrary image.

go get github.com/Logiraptor/palette

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateColors

func GenerateColors(img image.Image, numColors int) color.Palette

func TextColor

func TextColor(background color.RGBA) color.RGBA

TextColor determines whether white or black should be used for text against a given background

Types

type ColorCut

type ColorCut struct {
}

ColorCut implements the color cut image quantization algorithm

func (*ColorCut) Quantize

func (c *ColorCut) Quantize(p color.Palette, m image.Image) color.Palette

Quantize implements image/draw.Quantizer

Jump to

Keyboard shortcuts

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