The Go programming language's standard library provides support for manipulating graphical images represented using RGB, CMYK, YCbCr, and grayscale color models and variations such as 8- vs. 16-bit channels, premultiplied alpha vs. non-premultiplied alpha vs. no alpha, and paletted color. hsvimage
augments the Go standard library with support for the HSV (hue, saturation, and value) color model.
hsvimage
provides the following new image types (all of which implement the image.Image
interface), color types (all of which implement the color.Color
interface, and color models (all of which implement the color.Model
interface):
Image | Color | Color model | Description |
---|---|---|---|
NHSVA |
NHSVA |
NHSVAModel |
Non-alpha-premultiplied HSV + alpha, 8-bit color channels |
NHSVA64 |
NHSVA64 |
NHSVA64Model |
Non-alpha-premultiplied HSV + alpha, 16-bit color channels |
NHSVAF64 |
NHSVAF64 |
NHSVAF64Model |
Non-alpha-premultiplied HSV + alpha, 64-bit floating-point color channels |
hsvimage
and hsvimage/hsvcolor
, which are analogous to Go's image
and image/color
, respectively, can be imported in the usual manner:
import (
"github.com/spakin/hsvimage"
"github.com/spakin/hsvimage/hsvcolor"
)
See the pkg.go.dev documentation for hsvimage
and hsvcolor
.