Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + var Black = Gray16 + var Opaque = Alpha16 + var Transparent = Alpha16 + var White = Gray16 + func CMYKToRGB(c, m, y, k uint8) (uint8, uint8, uint8) + func RGBToCMYK(r, g, b uint8) (uint8, uint8, uint8, uint8) + func RGBToYCbCr(r, g, b uint8) (uint8, uint8, uint8) + func YCbCrToRGB(y, cb, cr uint8) (uint8, uint8, uint8) + type Alpha struct + A uint8 + func (c Alpha) RGBA() (r, g, b, a uint32) + type Alpha16 struct + A uint16 + func (c Alpha16) RGBA() (r, g, b, a uint32) + type CMYK struct + C uint8 + K uint8 + M uint8 + Y uint8 + func (c CMYK) RGBA() (uint32, uint32, uint32, uint32) + type Color interface + RGBA func() (r, g, b, a uint32) + type Gray struct + Y uint8 + func (c Gray) RGBA() (r, g, b, a uint32) + type Gray16 struct + Y uint16 + func (c Gray16) RGBA() (r, g, b, a uint32) + type Model interface + Convert func(c Color) Color + var Alpha16Model Model = ModelFunc(alpha16Model) + var AlphaModel Model = ModelFunc(alphaModel) + var CMYKModel Model = ModelFunc(cmykModel) + var Gray16Model Model = ModelFunc(gray16Model) + var GrayModel Model = ModelFunc(grayModel) + var NRGBA64Model Model = ModelFunc(nrgba64Model) + var NRGBAModel Model = ModelFunc(nrgbaModel) + var NYCbCrAModel Model = ModelFunc(nYCbCrAModel) + var RGBA64Model Model = ModelFunc(rgba64Model) + var RGBAModel Model = ModelFunc(rgbaModel) + var YCbCrModel Model = ModelFunc(yCbCrModel) + func ModelFunc(f func(Color) Color) Model + type NRGBA struct + A uint8 + B uint8 + G uint8 + R uint8 + func (c NRGBA) RGBA() (r, g, b, a uint32) + type NRGBA64 struct + A uint16 + B uint16 + G uint16 + R uint16 + func (c NRGBA64) RGBA() (r, g, b, a uint32) + type NYCbCrA struct + A uint8 + func (c NYCbCrA) RGBA() (uint32, uint32, uint32, uint32) + type Palette []Color + func (p Palette) Convert(c Color) Color + func (p Palette) Index(c Color) int + type RGBA struct + A uint8 + B uint8 + G uint8 + R uint8 + func (c RGBA) RGBA() (r, g, b, a uint32) + type RGBA64 struct + A uint16 + B uint16 + G uint16 + R uint16 + func (c RGBA64) RGBA() (r, g, b, a uint32) + type YCbCr struct + Cb uint8 + Cr uint8 + Y uint8 + func (c YCbCr) RGBA() (uint32, uint32, uint32, uint32)