Documentation
¶
Index ¶
- func BoundToGamutXY(x, y, rx, ry, gx, gy, bx, by float64) (cx, cy float64)
- func HSVtoRGB(h, s, v float64) (r, g, b float64)
- func RGBtoHSV(r, g, b float64) (h, s, v float64)
- func RGBtoXYBPhilipsWideRGBD65(r, g, b float64) (x, y, bri float64)
- func XYBtoRGBPhilipsWideRGBD65(x, y, bri float64) (r, g, b float64)
- type Color
- func (c Color) HSVf() (h, s, v float64)
- func (c Color) HasK() bool
- func (c Color) Kf() float64
- func (c Color) RGBf() (r, g, b float64)
- func (c Color) String() string
- func (c Color) Strip() Color
- func (c Color) TermBG(s string) string
- func (c Color) TermFG(s string) string
- func (c Color) XYBfPhilipsWideRGBD65() (x, y, bri float64)
- type ListItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoundToGamutXY ¶
BoundToGamutXY compares the point x,y to the triangle formed by rx,ry, gx,gy, bx,by. If the point falls within the triangle, x and y are returned. If the point falls outside the triangle, the x and y values of the nearest point on the triangle are returned.
func HSVtoRGB ¶
HSVtoRGB converts hue, saturation and brightness values on the range of 0.0 to 1.0 to RGB floating point values on the range of 0.0 to 1.0
func RGBtoHSV ¶
RGBtoHSV converts red, green, and blue floating point values on the range 0.0 to 1.0 to hue, saturation and brightness values on the range 0.0 to 1.0
func RGBtoXYBPhilipsWideRGBD65 ¶
RGBtoXYBPhilipsWideRGBD65 converts red, green, and blue floating point values on the range 0.0 to 1.0 to CIE colorspace x, y, and brightness values on the range 0.0 to 1.0 using Philips Wide RGB D65 conversion.
func XYBtoRGBPhilipsWideRGBD65 ¶
XYBtoRGBPhilipsWideRGBD65 converts CIE colorspace x, y, and brightness values on the range 0.0 to 1.0 to red, green, and blue floating point values on the range 0.0 to 1.0 using Philips Wide RGB D65 conversion.
Types ¶
type Color ¶
type Color uint32
Color is a KRGB color value packed in a uint32.
func HSVf ¶
HSVf converts hue, saturation and brightness values on the range of 0.0 to 1.0 to a Color
func RGBf ¶
RGBf converts red, green, and blue float64 values on the range of 0.0 to 1.0 to a Color. The inputs are clamped to the range of 0.0 to 1.0
func XYBfPhilipsWideRGBD65 ¶
XYBfPhilipsWideRGBD65 converts x, y, and brightness values on the range 0.0 to 1.0 to a Color using Philips Wide RGB D65 conversion.
func (Color) HSVf ¶
HSVf returns the hue, saturation and brightness components as float64 on the range 0.0 to 1.0
func (Color) HasK ¶
HasK returns true if C has a fourth component which may be interpreted as color temperature.
func (Color) RGBf ¶
RGBf returns the red, green, and blue components as float64 on the range 0.0 to 1.0
func (Color) XYBfPhilipsWideRGBD65 ¶
XYBfPhilipsWideRGBD65 returns x, y, and brightness values on the range 0.0 to 1.0 using Philips Wide RGB D65 conversion.