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 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 Seq(first, last uint32, num int) []uint32
- func SprintcTermBG(c uint32, s string) string
- func SprintcTermFG(c uint32, s string) string
- 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 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
func RGBtoXYB ¶
RGBtoXYB 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 Phillips Wide RGB D65 conversion.
func SprintcTermBG ¶
SprintcTermBG wraps s to set the terminal background color to the 24 bit RGB value of c
func SprintcTermFG ¶
SprintcTermFG wraps s to set the terminal foreground color to the 24 bit RGB value of c
Types ¶
This section is empty.