Documentation ¶
Index ¶
- func EGA(i EGAIndex, a uint8) color.NRGBA
- func Names() []string
- func Parse(s string, name string) (color.NRGBA, error)
- func SaveCachedLUTs(w, h int, dir string) error
- func SetCurrent(pal *Palette, doRemap bool) bool
- type EGAIndex
- type Palette
- func (p *Palette) ApplyToImage(img image.Image, name string) image.Image
- func (p *Palette) ApplyToNRGBA(col color.NRGBA, name string) color.NRGBA
- func (p *Palette) ApplyToRGBA(col color.RGBA, name string) color.RGBA
- func (p *Palette) BayerPattern(size int) []float32
- func (p *Palette) HalftonePattern(size int) []float32
- func (p *Palette) ToLUT(bounds image.Rectangle, numLUTs int) (image.Image, int, int, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Names ¶
func Names() []string
Names returns the names of all palettes, in quoted comma separated for, for inclusion in a flag description.
func SaveCachedLUTs ¶ added in v1.2.164
func SetCurrent ¶ added in v1.2.141
SetCurrent changes the current palette. Returns whether the remapping table changed.
Types ¶
type Palette ¶
type Palette struct {
// contains filtered or unexported fields
}
Palette encapsulates a color palette.
func (*Palette) ApplyToImage ¶ added in v1.2.141
ApplyToImage applies this palette's associated color remapping to an image.
func (*Palette) ApplyToNRGBA ¶ added in v1.2.141
ApplyToNRGBA applies this palette's associated col remapping to a single col.
func (*Palette) ApplyToRGBA ¶ added in v1.2.141
ApplyToRGBA applies this palette's associated col remapping to a single col.
func (*Palette) BayerPattern ¶
BayerPattern computes the Bayer pattern for this palette.
func (*Palette) HalftonePattern ¶ added in v1.1.280
HalftonePattern computes the Halftone pattern for this palette.
Click to show internal directories.
Click to hide internal directories.