zekroTJA / colorname

A go package to find the color name of a given color value.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

~ colorname ~

Find the name of colors.

       

go get -u github.com/zekroTJA/colorname

Intro

colorname matches a given color to the most similar looking color of the "List of colors" of Wikipedia.

This package is inspired by jcolag/color-namer.

Here you can read the docs of this package, generated by pkg.go.dev.


Usage Example

package main

import (
    "fmt"

	"github.com/zekroTJA/colorname"
)

func main() {
    matches := colornames.FindNum(0x6a0dad)
    
    for _, m := range matches {
        fmt.Printf("%+v\n", m)
    }
}

Further examples, you can find in the example directory.


Copyright (c) 2020 zekro Development (Ringo Hoffmann).
Covered by MIT licence.

About

A go package to find the color name of a given color value.

License:MIT License


Languages

Language:Go 98.1%Language:Python 1.9%