colors

package
v2.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Bold = iota + 1
	Faint
	Italic
	Underline
	BlinkSlow
	BlinkFast
	Inverse
	Hide
	CrossedOut
)

Style values

View Source
const (
	Black = iota
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

Color values

Variables

View Source
var Colors = [...]string{
	"black",
	"red",
	"green",
	"yellow",
	"blue",
	"magenta",
	"cyan",
	"white",
}

Colors contains color names

View Source
var Styles = [...]string{
	"bold",
	"faint",
	"italic",
	"underline",
	"blink-slow",
	"blink-fast",
	"inverse",
	"hide",
	"crossed-out",
}

Styles contains style names

Functions

func ANSICode

func ANSICode(fg, bg, style int) string

ANSICode returns an ANSI escape sequence string for the requested output

func ANSICodeString

func ANSICodeString(desc string) (string, error)

ANSICodeString returns an ANSI escape sequence string for the requested output. The description is a coma-separated list of foreground color, background color and style: [fg],[bg],[style] An empty description or "reset" returns the ANSI reset sequence.

Types

This section is empty.

Jump to

Keyboard shortcuts

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