color

package
v0.0.0-...-e815181 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	N1 = "N1" // foreground color
	N2 = "N2"
	N3 = "N3"
	N4 = "N4"
	N5 = "N5"
	N6 = "N6"
	N7 = "N7" // background color

	// Base Colors: used for containers
	B1 = "B1"
	B2 = "B2"
	B3 = "B3"
	B4 = "B4"
	B5 = "B5"
	B6 = "B6"

	// Alternative colors A
	AA2 = "AA2"
	AA4 = "AA4"
	AA5 = "AA5"

	// Alternative colors B
	AB4 = "AB4"
	AB5 = "AB5"

	// Special
	Empty = ""
	None  = "none"
)

Variables

This section is empty.

Functions

func Darken

func Darken(colorString string) (string, error)

func IsThemeColor

func IsThemeColor(colorString string) bool

func Luminance

func Luminance(colorString string) (float64, error)

func LuminanceCategory

func LuminanceCategory(colorString string) (string, error)

Types

type RGB

type RGB struct {
	Red   uint8
	Green uint8
	Blue  uint8
}

func Name2RGB

func Name2RGB(name string) RGB

Jump to

Keyboard shortcuts

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