Documentation ¶
Overview ¶
Package util provides various helper functions for the package bild.
Index ¶
- func GrayImageEqual(a, b *image.Gray) bool
- func HSLToRGB(h, s, l float64) color.RGBA
- func HSVToRGB(h, s, v float64) color.RGBA
- func RGBAImageEqual(a, b *image.RGBA) bool
- func RGBASlicesEqual(a, b []color.RGBA) bool
- func RGBAToString(img *image.RGBA) string
- func RGBToHSL(c color.RGBA) (float64, float64, float64)
- func RGBToHSV(c color.RGBA) (h, s, v float64)
- func Rank(c color.RGBA) float64
- func SortRGBA(data []color.RGBA, min, max int)
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrayImageEqual ¶
GrayImageEqual returns true if the parameter images a and b match or false if otherwise.
func HSLToRGB ¶
HSLToRGB converts from HSL to RGB color model. Parameter h is the hue and its range is from 0 to 360 degrees. Parameter s is the saturation and its range is from 0.0 to 1.0. Parameter l is the lightness and its range is from 0.0 to 1.0.
func HSVToRGB ¶
HSVToRGB converts from HSV to RGB color model. Parameter h is the hue and its range is from 0 to 360 degrees. Parameter s is the saturation and its range is from 0.0 to 1.0. Parameter v is the value and its range is from 0.0 to 1.0.
func RGBAImageEqual ¶
RGBAImageEqual returns true if the parameter images a and b match or false if otherwise.
func RGBASlicesEqual ¶
RGBASlicesEqual returns true if the parameter RGBA color slices a and b match or false if otherwise.
func RGBAToString ¶
RGBAToString returns a string representation of the Hex values contained in an image.RGBA.
func RGBToHSL ¶
RGBToHSL converts from RGB to HSL color model. Parameter c is the RGBA color and must implement the color.RGBA interface. Returned values h, s and l correspond to the hue, saturation and lightness. The hue is of range 0 to 360 and the saturation and lightness are of range 0.0 to 1.0.