Documentation ¶
Index ¶
- func BoundToGamutXY(x, y, rx, ry, gx, gy, bx, by float64) (cx, cy float64)
- func CtoRGB(c uint32) (r, g, b float64)
- func CtoTermBG(c uint32, s string) string
- func CtoTermFG(c uint32, s string) string
- func HSVtoRGB(h, s, v float64) (r, g, b float64)
- func RGBtoC(r, g, b float64) (c uint32)
- func RGBtoHSV(r, g, b float64) (h, s, v float64)
- func RGBtoXYB(r, g, b float64) (x, y, bri float64)
- func XKCD(s string) (uint32, bool)
- func XYBtoRGB(x, y, bri float64) (r, g, b float64)
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 value of the nearest point on the triangle is returned.
func CtoRGB ¶
CtoRGB converts a 24 bit RGB value stored in the least significant bits of a uint32 to float64 values on the range of 0.0 to 1.0
func CtoTermBG ¶
CtoTermBG wraps s to set the terminal background color to the 24 bit RGB value of c
func CtoTermFG ¶
CtoTermFG wraps s to set the terminal foreground color to the 24 bit RGB value of c
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 RGBtoC ¶
RGBtoC converts r, g, and b float64 values on the range of 0.0 to 1.0 to a 24 bit RGB value stored in the least significant bits of a uint32. The inputs are clamped to 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
Types ¶
This section is empty.