munsell

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 3 Imported by: 0

README

munsell

Hex color code to color name library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color int
const (
	Unknown Color = iota
	White
	Black
	Red
	Orange
	Yellow
	Green
	LightBlue
	Blue
	Purple
)

func GetColorFromHSL

func GetColorFromHSL(hsl HSLComponents) Color

func GetColorFromHex

func GetColorFromHex(hexColor string) (color Color, err error)

Returns a color from Color when passed a hex color code, defaults to Unknown

func GetColorFromRGB

func GetColorFromRGB(rgb RGBComponents) Color

func (Color) String

func (c Color) String() string

type HSLComponents

type HSLComponents struct {
	Hue, Saturation, Lightness float64
}

type RGBComponents

type RGBComponents struct {
	Red, Green, Blue uint8
}

Jump to

Keyboard shortcuts

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