Documentation ¶
Overview ¶
Package colorcmp supports comparing colors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Brighter ¶
Brighter takes two colors and returns whether color a brighter than color b by gray scale comparison.
func ColorStr ¶
ColorStr converts clr to 8-bit-per-channel, non-pre-alpha-multiplied RGBA and returns either a "#rrggbb" representation if it's fully opaque or "#rrggbbaa" otherwise.
func ColorsMatch ¶
ColorsMatch takes two colors and returns whether or not each component is within maxDiff of each other after conversion to 8-bit-per-channel, non-alpha-premultiplied RGBA.
func DominantColor ¶
DominantColor returns the color that occupies the largest number of pixels in the passed in image. It also returns the ratio of that pixel to the number of overall pixels in the image.
Types ¶
This section is empty.