Documentation
¶
Index ¶
- Variables
- func CodeToRGB(n uint8) (uint8, uint8, uint8)
- func DistanceRGB(c1 *color.RGBA, c2 *color.RGBA) float64
- func ParseHexColor(s string) (c *color.RGBA, err error)
- func RGBAToHexColor(c color.RGBA) string
- func RGBToHexColor(r uint8, g uint8, b uint8) string
- type ClosestToRGBInput
- type ColorProp
- type RoundMode
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorLookup = map[string]uint8{}/* 466 elements not displayed */
View Source
var ColorNames = [][]string{}/* 256 elements not displayed */
View Source
var Colors = [256]*ColorProp{}/* 256 elements not displayed */
View Source
var ColorsHex = [256]string{}/* 256 elements not displayed */
View Source
var DefaultGrayMaxDelta uint8 = 20
DefaultGrayMaxDelta is default value for GrayMaxDelta as option for ClosestToRGB func
Functions ¶
func RGBAToHexColor ¶
Types ¶
type ClosestToRGBInput ¶
type ClosestToRGBInput struct { GrayMaxDelta *uint8 // optional, default: DefaultGrayMaxDelta Target color.RGBA RoundMode RoundMode // optional, default: RoundCloser }
ClosestToRGBInput is input struct for ClosestToRGB
type ColorProp ¶
type ColorProp struct { Hex string Names []string HSL [3]float64 HSV [3]float64 RGBA color.RGBA Code uint8 }
func ClosestToRGB ¶
func ClosestToRGB(in *ClosestToRGBInput) (*ColorProp, error)
ClosestToRGB finds the closest terminal color to a given full RGB color
func ClosestToRGBFromPalette ¶
Click to show internal directories.
Click to hide internal directories.