Documentation
¶
Index ¶
- Variables
- func IptToLms(i, p, t float64) (l, m, s float64)
- func LmsMcat02ToXyz(l, m, s float64) (x, y, z float64)
- func LmsMhpeToXyz(l, m, s float64) (x, y, z float64)
- func LmsToIpt(l, m, s float64) (i, p, t float64)
- func LmsToXyz(l, m, s float64) (x, y, z float64)
- func XyzToLms(x, y, z float64) (l, m, s float64)
- func XyzToLmsMcat02(x, y, z float64) (l, m, s float64)
- func XyzToLmsMhpe(x, y, z float64) (l, m, s float64)
- type Color
- type RAW
- type RGB
- type XYZ
Constants ¶
This section is empty.
Variables ¶
var ( RGBModel = color.ModelFunc(rgbModel) XYZModel = color.ModelFunc(xyzModel) )
Models for the standard color types.
Functions ¶
func LmsMcat02ToXyz ¶
LmsMcat02ToXyz converts from LMS-space (using CIE CAT02 matrix) to CIE XYZ-space.
func LmsMhpeToXyz ¶
LmsMhpeToXyz converts from LMS-space (using Hunt-Pointer-Estevez matrix) to CIE XYZ-space.
func XyzToLmsMcat02 ¶
XyzToLmsMcat02 converts from CIE XYZ-space to LMS-space (using CIE CAT02 matrix).
func XyzToLmsMhpe ¶
XyzToLmsMhpe converts from CIE XYZ-space to LMS-space (using Hunt-Pointer-Estevez matrix).
Types ¶
type Color ¶
type Color interface { color.Color // HDRRGBA returns the red, green, blue and alpha values // for the HDR color. HDRRGBA() (r, g, b, a float64) // HDRXYZA returns the x, y, z and alpha values // for the HDR color. HDRXYZA() (x, y, z, a float64) // HDRPixel returns the raw channels' values of a pixel. HDRPixel() (p1, p2, p3, pa float64) }
Color can convert itself to alpha-premultiplied 16-bits per channel RGBA and HDR float64 RGB. The conversion may be lossy.
type RAW ¶
type RAW struct {
P1, P2, P3 float64
}
RAW represents a HDR color in no specific color-space. Take care when you use this color!
type RGB ¶
type RGB struct {
R, G, B float64
}
RGB represents a HDR color in RGB color-space.
type XYZ ¶
type XYZ struct {
X, Y, Z float64
}
XYZ represents a HDR color in XYZ color-space.