color

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Clear = "\x1b[0m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute int
const (
	Reset Attribute = iota
	Bold
	Faint
	Italic
	Underline
	SlowBlink
	RapidBlink
	ReverseVideo
	Conceal
	CrossedOut
)

https://en.wikipedia.org/wiki/ANSI_escape_code

type Color

type Color int
const (
	Black Color = iota + 30
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

type Sequence

type Sequence []Attribute

func Base

func Base(attrs ...Attribute) Sequence

func Bg

func Bg(c Color) Sequence

func Fg

func Fg(c Color) Sequence

func Hi

func Hi(c Color) Sequence

func HiBg

func HiBg(c Color) Sequence

func (Sequence) Base

func (seq Sequence) Base(attrs ...Attribute) Sequence

func (Sequence) Bg

func (seq Sequence) Bg(c Color) Sequence

func (Sequence) BgRGB

func (seq Sequence) BgRGB(r, g, b int) Sequence

func (Sequence) Fg

func (seq Sequence) Fg(c Color) Sequence

func (Sequence) FgRGB

func (seq Sequence) FgRGB(r, g, b int) Sequence

func (Sequence) Hi

func (seq Sequence) Hi(c Color) Sequence

func (Sequence) HiBg

func (seq Sequence) HiBg(c Color) Sequence

func (Sequence) String

func (seq Sequence) String() string

Jump to

Keyboard shortcuts

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