color

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Enabled = false

Functions

func Embolden

func Embolden(s string) string

func Palette

func Palette() string

Types

type Code

type Code int
var (
	Reset      Code = -1
	Bold       Code = -2
	Red        Code = 1
	Green      Code = 2
	GrayYellow Code = 3
	Blue       Code = 4
	Turqoise   Code = 31
	Purple     Code = 105
	Orange     Code = 208
	Pink       Code = 200
)

func Gray

func Gray(level int) Code

func (Code) Colorize

func (code Code) Colorize(s string) string

func (Code) String

func (code Code) String() string

type Stack

type Stack []Code

func (*Stack) End

func (s *Stack) End(w io.Writer) error

func (*Stack) Pop

func (s *Stack) Pop() string

func (*Stack) Push

func (s *Stack) Push(c Code) string

func (*Stack) Start

func (s *Stack) Start(w io.Writer, code Code) error

func (Stack) Top

func (s Stack) Top() Code

Jump to

Keyboard shortcuts

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