Palette is a palette of colors. Convert returns the palette color closest to c in Euclidean R,G,B space. Index returns the index of the palette color closest to c in Euclidean
R,G,B,A space.
Palette : Model
func image/draw.Quantizer.Quantize(p Palette, m image.Image) Palette
func image.NewPaletted(r image.Rectangle, p Palette) *image.Paletted
func image/draw.Quantizer.Quantize(p Palette, m image.Image) Palette
RGBA represents a traditional 32-bit alpha-premultiplied color, having 8
bits for each of red, green, blue and alpha.
An alpha-premultiplied color component C has been scaled by alpha (A), so
has valid values 0 <= C <= A.Auint8Buint8Guint8Ruint8( RGBA) RGBA() (r, g, b, a uint32)
RGBA : Color
func image.(*RGBA).RGBAAt(x, y int) RGBA
func image.(*RGBA).SetRGBA(x, y int, c RGBA)
YCbCr represents a fully opaque 24-bit Y'CbCr color, having 8 bits each for
one luma and two chroma components.
JPEG, VP8, the MPEG family and other codecs use this color model. Such
codecs often use the terms YUV and Y'CbCr interchangeably, but strictly
speaking, the term YUV applies only to analog video signals, and Y' (luma)
is Y (luminance) after applying gamma correction.
Conversion between RGB and Y'CbCr is lossy and there are multiple, slightly
different formulae for converting between the two. This package follows
the JFIF specification at https://www.w3.org/Graphics/JPEG/jfif3.pdf.Cbuint8Cruint8Yuint8( YCbCr) RGBA() (uint32, uint32, uint32, uint32)
YCbCr : Color
func image.(*YCbCr).YCbCrAt(x, y int) YCbCr
Package-Level Functions (total 5)
CMYKToRGB converts a [CMYK] quadruple to an RGB triple.
ModelFunc returns a [Model] that invokes f to implement the conversion.
RGBToCMYK converts an RGB triple to a CMYK quadruple.
RGBToYCbCr converts an RGB triple to a Y'CbCr triple.
YCbCrToRGB converts a Y'CbCr triple to an RGB triple.
The pages are generated with Goldsv0.7.0-preview. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.