color

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(a Attribute, v ...any) string

func Stringf

func Stringf(a Attribute, format string, v ...any) string

Types

type Attribute

type Attribute int
const (
	FgGreen   Attribute = Attribute(color.FgGreen)
	FgRed     Attribute = Attribute(color.FgRed)
	FgCyan    Attribute = Attribute(color.FgCyan)
	FgMagenta Attribute = Attribute(color.FgMagenta)
	FgBlack   Attribute = Attribute(color.FgBlack)
	FgBlue    Attribute = Attribute(color.FgBlue)
	FgWhite   Attribute = Attribute(color.FgWhite)
	FgYellow  Attribute = Attribute(color.FgYellow)

	FgHiBlack   Attribute = Attribute(color.FgHiBlack)
	FgHiBlue    Attribute = Attribute(color.FgHiBlue)
	FgHiCyan    Attribute = Attribute(color.FgHiCyan)
	FgHiGreen   Attribute = Attribute(color.FgHiGreen)
	FgHiMagenta Attribute = Attribute(color.FgHiMagenta)
	FgHiRed     Attribute = Attribute(color.FgHiRed)
	FgHiWhite   Attribute = Attribute(color.FgHiWhite)
	FgHiYellow  Attribute = Attribute(color.FgHiYellow)

	BgGreen   Attribute = Attribute(color.BgGreen)
	BgRed     Attribute = Attribute(color.BgRed)
	BgCyan    Attribute = Attribute(color.BgCyan)
	BgMagenta Attribute = Attribute(color.BgMagenta)
	BgBlack   Attribute = Attribute(color.BgBlack)
	BgBlue    Attribute = Attribute(color.BgBlue)
	BgWhite   Attribute = Attribute(color.BgWhite)
	BgYellow  Attribute = Attribute(color.BgYellow)

	BgHiBlack   Attribute = Attribute(color.BgHiBlack)
	BgHiBlue    Attribute = Attribute(color.BgHiBlue)
	BgHiCyan    Attribute = Attribute(color.BgHiCyan)
	BgHiGreen   Attribute = Attribute(color.BgHiGreen)
	BgHiMagenta Attribute = Attribute(color.BgHiMagenta)
	BgHiRed     Attribute = Attribute(color.BgHiRed)
	BgHiWhite   Attribute = Attribute(color.BgHiWhite)
	BgHiYellow  Attribute = Attribute(color.BgHiYellow)
)

type Color

type Color struct {
	color.Color
}

func New

func New(value ...Attribute) *Color

func NewBgRGB

func NewBgRGB(r int, g int, b int) *Color

func NewRGB

func NewRGB(r int, g int, b int) *Color

Jump to

Keyboard shortcuts

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