colorex

package module
v0.0.0-...-09f7c0d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: MIT Imports: 10 Imported by: 0

README

ColorEx

ColorEx extracts dominant color palette from an image.

It uses very simple algorithm based on distance between two points in 3D space. Sometimes results may be not accurate.

Documentation

Overview

ColorEx extracts dominant color palette from an image

Index

Constants

This section is empty.

Variables

View Source
var CSS3Palette = []string{}/* 147 elements not displayed */
View Source
var HTML4Palette = []string{
	"#00ffff",
	"#000000",
	"#0000ff",
	"#ff00ff",
	"#008000",
	"#808080",
	"#00ff00",
	"#800000",
	"#000080",
	"#808000",
	"#800080",
	"#ff0000",
	"#c0c0c0",
	"#008080",
	"#ffffff",
	"#ffff00",
	"#ffa500",
}

Functions

This section is empty.

Types

type Result

type Result struct {
	Hex   string
	Match int
}

func ExtractColors

func ExtractColors(imgReader io.Reader, limit int, hexPalette []string) ([]Result, error)

Default limit = 5 Default palette = HTML4 palette

Jump to

Keyboard shortcuts

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