Documentation ¶
Index ¶
- Variables
- func LABCompress(t float32) float32
- func LABToXYZ(l, a, b float32) (x, y, z float32)
- func LABUncompress(ft float32) float32
- func LToY(l float32) float32
- func SRGB100ToLinear(r, g, b float32) (rl, gl, bl float32)
- func SRGBFloatToUint32(rf, gf, bf, af float32) (r, g, b, a uint32)
- func SRGBFloatToUint8(rf, gf, bf, af float32) (r, g, b, a uint8)
- func SRGBFromLinear(rl, gl, bl float32) (r, g, b float32)
- func SRGBFromLinear100(rl, gl, bl float32) (r, g, b float32)
- func SRGBFromLinearComp(lin float32) float32
- func SRGBLinToXYZ(rl, gl, bl float32) (x, y, z float32)
- func SRGBToLinear(r, g, b float32) (rl, gl, bl float32)
- func SRGBToLinearComp(srgb float32) float32
- func SRGBToXYZ(r, g, b float32) (x, y, z float32)
- func SRGBToXYZ100(r, g, b float32) (x, y, z float32)
- func SRGBUint32ToFloat(r, g, b, a uint32) (fr, fg, fb, fa float32)
- func SRGBUint8ToFloat(r, g, b, a uint8) (fr, fg, fb, fa float32)
- func XYZ100ToSRGB(x, y, z float32) (r, g, b float32)
- func XYZDenormD65(x, y, z float32) (xr, yr, zr float32)
- func XYZNormD65(x, y, z float32) (xr, yr, zr float32)
- func XYZToLAB(x, y, z float32) (l, a, b float32)
- func XYZToSRGB(x, y, z float32) (r, g, b float32)
- func XYZToSRGBLin(x, y, z float32) (rl, gl, bl float32)
- func YToL(y float32) float32
Constants ¶
This section is empty.
Variables ¶
var WhiteD50 = math32.Vec3(96.4212, 100.0, 82.5188)
WhiteD50 is the standard white color used for printing industry, D50, in XYZ coordinates.
var WhiteD65 = math32.Vec3(95.047, 100.0, 108.883)
WhiteD65 is the standard white color for midday sun, D65, in XYZ coordinates. Used as a standard reference illumination condition for most cases.
Functions ¶
func LABCompress ¶
LABCompress does cube-root compression of the X, Y, Z components prior to performing the LAB conversion
func LABToXYZ ¶
LABToXYZ converts a color from L*a*b* to XYZ coordinates using the standard D65 illuminant
func LABUncompress ¶
func LToY ¶
LToY Converts an L* value to a Y value. L* in L*a*b* and Y in XYZ measure the same quantity, luminance. L* measures perceptual luminance, a linear scale. Y in XYZ measures relative luminance, a logarithmic scale.
func SRGB100ToLinear ¶
SRGB100ToLinear converts set of sRGB components to linear values, removing gamma correction. returns 100-base RGB values
func SRGBFloatToUint32 ¶
SRGBFloatToUint32 converts the given non-alpha-premuntiplied sRGB float32 values to alpha-premultiplied sRGB uint32 values.
func SRGBFloatToUint8 ¶
SRGBFloatToUint8 converts the given non-alpha-premuntiplied sRGB float32 values to alpha-premultiplied sRGB uint8 values.
func SRGBFromLinear ¶
SRGBFromLinear converts set of sRGB components from linear values, adding gamma correction.
func SRGBFromLinear100 ¶
SRGBFromLinear100 converts set of sRGB components from linear values in 0-100 range, adding gamma correction.
func SRGBFromLinearComp ¶
SRGBFromLinearComp converts an sRGB rgb linear component to non-linear (gamma corrected) sRGB value Used in converting from XYZ to sRGB.
func SRGBLinToXYZ ¶
SRGBLinToXYZ converts sRGB linear into XYZ CIE standard color space
func SRGBToLinear ¶
SRGBToLinear converts set of sRGB components to linear values, removing gamma correction.
func SRGBToLinearComp ¶
SRGBToLinearComp converts an sRGB rgb component to linear space (removes gamma). Used in converting from sRGB to XYZ colors.
func SRGBToXYZ100 ¶
SRGBToXYZ100 converts sRGB into XYZ CIE standard color space with 100-base sRGB values -- used for CAM16 but not CAM02
func SRGBUint32ToFloat ¶
SRGBUint32ToFloat converts the given alpha-premultiplied sRGB uint32 values to non-alpha-premuntiplied sRGB float32 values.
func SRGBUint8ToFloat ¶
SRGBUint8ToFloat converts the given alpha-premultiplied sRGB uint8 values to non-alpha-premuntiplied sRGB float32 values.
func XYZ100ToSRGB ¶
XYZ100ToSRGB converts XYZ CIE standard color space, 100 base units, into sRGB
func XYZDenormD65 ¶
XYZDenormD65 de-normalizes XZY values relative to the D65 outdoor white light values
func XYZNormD65 ¶
XYZNormD65 normalizes XZY values relative to the D65 outdoor white light values
func XYZToLAB ¶
XYZToLAB converts a color from XYZ to L*a*b* coordinates using the standard D65 illuminant
func XYZToSRGBLin ¶
XYZToSRGBLin converts XYZ CIE standard color space to sRGB linear
Types ¶
This section is empty.