Documentation
¶
Overview ¶
Provides a color.Color type for dealing with linear RGB colours without alpha.
Index ¶
Constants ¶
This section is empty.
Variables ¶
A color.Model for converting arbitrary colours to a linear RGB Color.
Wraps the Convert function, returning a color.Color interface rather than the Color type.
Functions ¶
func Distance ¶
Distance returns the euclidean distance between two colours,
If you just want to compare relative distances, use DistanceSqr instead.
Types ¶
type Color ¶
type Color struct {
R, G, B float64
}
Color is a linear RGBA color.Color.
func (Color) NLRGBA ¶
NLRGBA converts to non-premultiplied linear RGBA.
func (Color) NOkLabA ¶
NOkLabA converts to non-premultiplied OkLab+Alpha.
func (Color) NRGBA ¶
NRGBA converts to non-premultiplied RGBA.
func (Color) NXYZA ¶
NXYZA converts to non-premultiplied XYZ+Alpha.
func (Color) RGBA ¶
RGBA converts to premultiplied RGBA, implementing the color.Color interface.