Documentation
¶
Overview ¶
Provides a color.Color type for dealing with premultiplied linear RGBA colours.
Index ¶
Constants ¶
This section is empty.
Variables ¶
A color.Model for converting arbitrary colours to a premultiplied linear RGBA Color.
Wraps the Convert function, returning a color.Color interface rather than the Color type.
Functions ¶
func Distance ¶
Distance returns the maximum possible euclidean distance between two colours, accounting for the possible backgrounds they might be composited over.
If you just want to compare relative distances, use DistanceSqr instead.
Types ¶
type Color ¶
type Color struct {
R, G, B, A float64
}
Color is a pre-multiplied 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.