Documentation ¶
Overview ¶
Package plates provides utilities for manipulating colors and images.
Index ¶
- func AddToAs(orig image.Image, addimage image.Image, addcolor color.RGBA) image.Image
- func Blue(m image.Image) image.Image
- func CloseTo1(m image.Image, target color.RGBA, threshold uint8) image.Image
- func CloseTo2(m image.Image, target color.RGBA, threshold uint8) image.Image
- func Green(m image.Image) image.Image
- func HLS(r, g, b float64) (float64, float64, float64)
- func HLStoRGB(h, l, s float64) (float64, float64, float64)
- func HSV(cr color.RGBA) (uint8, uint8, uint8)
- func Hue(cr color.RGBA) float64
- func PaintMix(c1, c2 color.RGBA) color.RGBA
- func Read(filename string) (image.Image, error)
- func Red(m image.Image) image.Image
- func Separate3(inImage image.Image, color1, color2, color3 color.RGBA, threshold uint8) (image.Image, image.Image, image.Image)
- func Write(filename string, img image.Image) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToAs ¶
AddToAs will take an image, add the nontransparent colors from addimage, use addcolor and return an image.
func Blue ¶
Blue function isolates and returns the blue channel from an image. It returns a new image where only the blue component of each pixel's color is retained.
func CloseTo1 ¶
CloseTo1 function isolates pixels in an image that are similar to a target color within a given threshold. It returns a new image where only the pixels close to the target color are retained. Pixels that do not meet the threshold will be set to black (RGB{0,0,0}).
func CloseTo2 ¶
CloseTo2 will pick out only the colors close to the given color, within a given threshold. Make it uniform. Zero alpha to unused pixels in returned image.
func Green ¶
Green function isolates and returns the green channel from an image. It returns a new image where only the green component of each pixel's color is retained.
func PaintMix ¶
PaintMix will attempt to mix two RGB colors, a bit like how paint mixes (but not exactly like it)
func Read ¶
Read tries to read the given image filename and return an image.Image The supported extensions are: .png, .jpg, .jpeg, .gif, .ico, .bmp and .webp
func Red ¶
Red function isolates and returns the red channel from an image. It returns a new image where only the red component of each pixel's color is retained.
Types ¶
This section is empty.