color

package
v0.0.0-...-54241fc Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromChat

func FromChat(msg chat.Message) string

Types

type Attribute

type Attribute = string
const (
	Reset         Attribute = "0"
	Bold          Attribute = "1"
	Dim           Attribute = "2"
	Italic        Attribute = "3"
	Underline     Attribute = "4"
	Blinking      Attribute = "5"
	Inverse       Attribute = "6"
	Hidden        Attribute = "7"
	Strikethrough Attribute = "8"

	FgBlack   Attribute = "30"
	FgRed     Attribute = "31"
	FgGreen   Attribute = "32"
	FgYellow  Attribute = "33"
	FgBlue    Attribute = "34"
	FgMagenta Attribute = "35"
	FgCyan    Attribute = "36"
	FgWhite   Attribute = "37"

	BgBlack   Attribute = "40"
	BgRed     Attribute = "41"
	BgGreen   Attribute = "42"
	BgYellow  Attribute = "43"
	BgBlue    Attribute = "44"
	BgMagenta Attribute = "45"
	BgCyan    Attribute = "46"
	BgWhite   Attribute = "47"

	FgBrBlack   Attribute = "90"
	FgBrRed     Attribute = "91"
	FgBrGreen   Attribute = "92"
	FgBrYellow  Attribute = "93"
	FgBrBlue    Attribute = "94"
	FgBrMagenta Attribute = "95"
	FgBrCyan    Attribute = "96"
	FgBrWhite   Attribute = "97"

	BgBrBlack   Attribute = "100"
	BgBrRed     Attribute = "101"
	BgBrGreen   Attribute = "102"
	BgBrYellow  Attribute = "103"
	BgBrBlue    Attribute = "104"
	BgBrMagenta Attribute = "105"
	BgBrCyan    Attribute = "106"
	BgBrWhite   Attribute = "107"
)

type Color

type Color []Attribute

func (Color) Colorize

func (c Color) Colorize(str string) string

Jump to

Keyboard shortcuts

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