go/src/image/color/color.go

type Color

type RGBA

func (c RGBA) RGBA() (r, g, b, a uint32) {}

type RGBA64

func (c RGBA64) RGBA() (r, g, b, a uint32) {}

type NRGBA

func (c NRGBA) RGBA() (r, g, b, a uint32) {}

type NRGBA64

func (c NRGBA64) RGBA() (r, g, b, a uint32) {}

type Alpha

func (c Alpha) RGBA() (r, g, b, a uint32) {}

type Alpha16

func (c Alpha16) RGBA() (r, g, b, a uint32) {}

type Gray

func (c Gray) RGBA() (r, g, b, a uint32) {}

type Gray16

func (c Gray16) RGBA() (r, g, b, a uint32) {}

type Model

// ModelFunc returns a [Model] that invokes f to implement the conversion.
func ModelFunc(f func(Color) Color) Model {}

type modelFunc

func (m *modelFunc) Convert(c Color) Color {}

var RGBAModel

var RGBA64Model

var NRGBAModel

var NRGBA64Model

var AlphaModel

var Alpha16Model

var GrayModel

var Gray16Model

func rgbaModel(c Color) Color {}

func rgba64Model(c Color) Color {}

func nrgbaModel(c Color) Color {}

func nrgba64Model(c Color) Color {}

func alphaModel(c Color) Color {}

func alpha16Model(c Color) Color {}

func grayModel(c Color) Color {}

func gray16Model(c Color) Color {}

type Palette

// Convert returns the palette color closest to c in Euclidean R,G,B space.
func (p Palette) Convert(c Color) Color {}

// Index returns the index of the palette color closest to c in Euclidean
// R,G,B,A space.
func (p Palette) Index(c Color) int {}

// sqDiff returns the squared-difference of x and y, shifted by 2 so that
// adding four of those won't overflow a uint32.
//
// x and y are both assumed to be in the range [0, 0xffff].
func sqDiff(x, y uint32) uint32 {}

var Black

var White

var Transparent

var Opaque