colors

package
v0.30.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoogleChartColors = GetGoogleChartColors()
View Source
var GoogleChartColorsHex = [...]string{
	"#3366CC",
	"#DC3912",
	"#FF9900",
	"#109618",
	"#990099",
	"#3B3EAC",
	"#0099C6",
	"#DD4477",
	"#66AA00",
	"#B82E2E",
	"#316395",
	"#994499",
	"#22AA99",
	"#AAAA11",
	"#6633CC",
	"#E67300",
	"#8B0707",
	"#329262",
	"#5574A6",
	"#3B3EAC",
}

ChartColor1 is the color palette for Google Charts as collected by Craig Davis here: https://gist.github.com/there4/2579834

Functions

func ColorToHex

func ColorToHex(clr color.RGBA) string

func ColorfulColor

func ColorfulColor(clr color.RGBA) colorful.Color

func DistanceCIE2K

func DistanceCIE2K(color1, color2 color.RGBA) float64

func DistanceCIE76

func DistanceCIE76(color1, color2 color.RGBA) float64

func DistanceCIE94

func DistanceCIE94(color1, color2 color.RGBA) float64

func GetGoogleChartColors

func GetGoogleChartColors() []color.RGBA

func GoogleChartColorX

func GoogleChartColorX(index uint64) color.RGBA

func GoogleToColor

func GoogleToColor(googString string) (color.RGBA, error)

func HexToColor

func HexToColor(hexRGB string) (color.RGBA, error)

Parse returns a `color.RGBA` given a hex color code.

func Parse

func Parse(colorName string) (color.RGBA, error)

Parse returns a `color.RGBA` given a color name or hex color code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL