color

package
v0.0.0-...-705611b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RGBADistanceMetric

func RGBADistanceMetric(from color.Color, to color.Color) float64

Types

type DistanceMetric

type DistanceMetric func(from color.Color, to color.Color) float64

A function that can calculate a distane metric between two colors.

type LabColor

type LabColor struct {
	L float64
	A float64
	B float64
}

A point in the Lab color space. Implements the go image.Color interface

func (*LabColor) RGBA

func (c *LabColor) RGBA() (uint32, uint32, uint32, uint32)

Convert to RGBA colorspace

type LabColorModel

type LabColorModel struct {
}

An implementation of the go color.Model interface

func (*LabColorModel) Convert

func (cm *LabColorModel) Convert(in color.Color) color.Color

func (*LabColorModel) Distance

func (m *LabColorModel) Distance(from, to color.Color) float64

An implementation of DistanceMetric for the LabColor model.

Jump to

Keyboard shortcuts

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