color

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CReset = "\x1b[0m"
View Source
const Reset = "\x1b[0m"
View Source
const Resetbg = "\x1b[0m"

Variables

This section is empty.

Functions

This section is empty.

Types

type ANSI added in v0.9.22

type ANSI int
const (
	Black ANSI = iota
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

func (*ANSI) Next added in v0.9.22

func (c *ANSI) Next() Color

func (ANSI) Sprint added in v0.9.22

func (c ANSI) Sprint(s string) string

func (ANSI) String added in v0.9.22

func (c ANSI) String() string

type ANSIbg added in v0.9.22

type ANSIbg int
const (
	Blackbg ANSIbg = iota
	Redbg
	Greenbg
	Yellowbg
	Bluebg
	Magentabg
	Cyanbg
	Whitebg
)

func (*ANSIbg) Next added in v0.9.22

func (c *ANSIbg) Next() Color

func (ANSIbg) Sprint added in v0.9.22

func (c ANSIbg) Sprint(s string) string

func (ANSIbg) String added in v0.9.22

func (c ANSIbg) String() string

type C256 added in v0.9.22

type C256 int

func (*C256) Next added in v0.9.22

func (c *C256) Next() Color

#nosec

func (C256) Sprint added in v0.9.22

func (c C256) Sprint(s string) string

func (C256) String added in v0.9.22

func (c C256) String() string

type Color

type Color interface {
	Sprint(s string) string
	Next() Color
}

Jump to

Keyboard shortcuts

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