Categorygithub.com/takumakei/go-colornames
repositorypackage
0.0.0-20210515134037-cb3d073f589c
Repository: https://github.com/takumakei/go-colornames.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Color Names

GoDoc

The Go package colornames contains the list of color names.

The color names have taken from https://github.com/meodai/color-names.

example

// Find the longest color name and its color value.
var name string
var index int
for i := 0; i < colornames.N; i++ {
    v := colornames.Get(i)
    if len(v) > len(name) {
        name = v
        index = i
    }
}
c := colornames.RGB(index)
fmt.Println(c.Hex(), name)