color

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FGBlack = iota + 30
	FGRed
	FGGreen
	FGYellow
	FGBlue
	FGMagenta
	FGCyan
	FGWhite
)
View Source
const (
	FGBrightBlack = iota + 90
	FGBrightRed
	FGBrightGreen
	FGBrightYellow
	FGBrightBlue
	FGBrightMagenta
	FGBrightCyan
	FGBrightWhite
)
View Source
const PlainColor = 0

Variables

View Source
var UseEscapeSequences = false

Functions

func Black

func Black(s string) string

func BlackB

func BlackB(s string) string

func Blue

func Blue(s string) string

func BlueB

func BlueB(s string) string

func BrightBlack

func BrightBlack(s string) string

func BrightBlackB

func BrightBlackB(s string) string

func BrightBlue

func BrightBlue(s string) string

func BrightBlueB

func BrightBlueB(s string) string

func BrightCyan

func BrightCyan(s string) string

func BrightCyanB

func BrightCyanB(s string) string

func BrightGreen

func BrightGreen(s string) string

func BrightGreenB

func BrightGreenB(s string) string

func BrightMagenta

func BrightMagenta(s string) string

func BrightMagentaB

func BrightMagentaB(s string) string

func BrightRed

func BrightRed(s string) string

func BrightRedB

func BrightRedB(s string) string

func BrightWhite

func BrightWhite(s string) string

func BrightWhiteB

func BrightWhiteB(s string) string

func BrightYellow

func BrightYellow(s string) string

func BrightYellowB

func BrightYellowB(s string) string

func Colorize

func Colorize(s string, color int, bold bool) string

func Cyan

func Cyan(s string) string

func CyanB

func CyanB(s string) string

func Error

func Error(s string) string

func Green

func Green(s string) string

func GreenB

func GreenB(s string) string

func Info

func Info(s string) string

func Magenta

func Magenta(s string) string

func MagentaB

func MagentaB(s string) string

func Red

func Red(s string) string

func RedB

func RedB(s string) string

func Warn

func Warn(s string) string

func White

func White(s string) string

func WhiteB

func WhiteB(s string) string

func Yellow

func Yellow(s string) string

func YellowB

func YellowB(s string) string

Types

type Palette added in v1.4.0

type Palette struct {
	// contains filtered or unexported fields
}

func NewPalette added in v1.4.0

func NewPalette() *Palette

func (*Palette) Color added in v1.4.0

func (p *Palette) Color(s string, style Style) string

func (*Palette) Disable added in v1.4.0

func (p *Palette) Disable()

func (*Palette) Enable added in v1.4.0

func (p *Palette) Enable()

type Style added in v1.4.0

type Style int
const (
	PlainStyle Style = iota
	FieldLableStyle
	NumberStyle
	StringStyle
	BooleanStyle
	TernaryStyle
	DatetimeStyle
	NullStyle
	ObjectStyle
	AttributeStyle
	IdentifierStyle
	ValueStyle
	EmphasisStyle
)

type TextStyle added in v1.4.0

type TextStyle struct {
	Color int
	Bold  bool
}

Jump to

Keyboard shortcuts

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