color

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFG = escape.Sequence{Pre: "39", Post: ""} // DefaultFG resets the foreground color
	DefaultBG = escape.Sequence{Pre: "49", Post: ""} // DefaultBG resets the background color
)

Default Colors

Functions

This section is empty.

Types

type Color

type Color uint8

Color represents a 256 color mode sequence

const (
	Black Color = iota
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	LightGray
	DarkGray
	LightRed
	LightGreen
	LightYellow
	LightBlue
	LightMagenta
	LightCyan
	White
)

16 colors

func (Color) BG

func (c Color) BG() escape.Sequence

BG generates an escape Sequence which will set this color as the Background

func (Color) FG

func (c Color) FG() escape.Sequence

FG generates an escape Sequence which will set this color as the Foreground

Jump to

Keyboard shortcuts

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