color

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 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 Color

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

type Color256

type Color256 int

func (*Color256) Next

func (c *Color256) Next() Color

#nosec

func (Color256) Sprint

func (c Color256) Sprint(s string) string

func (Color256) String

func (c Color256) String() string

type ColorANSI

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

func (*ColorANSI) Next

func (c *ColorANSI) Next() Color

func (ColorANSI) Sprint

func (c ColorANSI) Sprint(s string) string

func (ColorANSI) String

func (c ColorANSI) String() string

type ColorANSIbg

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

func (*ColorANSIbg) Next

func (c *ColorANSIbg) Next() Color

func (ColorANSIbg) Sprint

func (c ColorANSIbg) Sprint(s string) string

func (ColorANSIbg) String

func (c ColorANSIbg) String() string

Jump to

Keyboard shortcuts

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