colors

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 2 Imported by: 3

README

Colors.Terminal Colors.

Documentation

Index

Constants

View Source
const (
	RESET          string = "\033[0m"
	BOLD           string = "\033[1m"
	DIM            string = "\033[2m"
	ITALIC         string = "\033[3m"
	UNDERLINE      string = "\033[4m"
	CURLYUNDERLINE string = "\033[4:3m"
	STRIKETHROUGH  string = "\033[9m"
)

Variables

This section is empty.

Functions

func Color256

func Color256(i uint8) string

func ColorBg256

func ColorBg256(i uint8) string

func NewColor added in v0.0.2

func NewColor(i uint8) func(string) *Color

func NewColorBg added in v0.0.2

func NewColorBg(i uint8) func(string) *Color

func NewColorBgDark added in v0.0.2

func NewColorBgDark(i uint8) func(string) *Color

func WrapBrackets

func WrapBrackets(s string) string

Types

type Color

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

func Beige

func Beige(s string) *Color

func BeigeBg

func BeigeBg(s string) *Color

func Blue

func Blue(s string) *Color

func BlueBg

func BlueBg(s string) *Color

func Gray

func Gray(s string) *Color

func GrayBg

func GrayBg(s string) *Color

func Green

func Green(s string) *Color

func GreenBg

func GreenBg(s string) *Color

func LightBlue

func LightBlue(s string) *Color

func LightBlueBg

func LightBlueBg(s string) *Color

func Magenta

func Magenta(s string) *Color

func MagentaBg

func MagentaBg(s string) *Color

func Red

func Red(s string) *Color

func RedBg

func RedBg(s string) *Color

func RedBgDark

func RedBgDark(s string) *Color

func White

func White(s string) *Color

func Wrap

func Wrap(code, s string) *Color

func Wrap2

func Wrap2(code, codebg, s string) *Color

func WrapBg

func WrapBg(codebg, s string) *Color

func WrapBgDark

func WrapBgDark(codebg, s string) *Color

func Yellow

func Yellow(s string) *Color

func YellowBg

func YellowBg(s string) *Color

func (*Color) Bold

func (c *Color) Bold() string

func (*Color) CurlyUnderline

func (c *Color) CurlyUnderline() string

func (*Color) Dim

func (c *Color) Dim() string

func (*Color) Italic

func (c *Color) Italic() string

func (*Color) NoReset

func (c *Color) NoReset() string

func (*Color) StrikeThrough

func (c *Color) StrikeThrough() string

func (*Color) String

func (c *Color) String() string

func (*Color) Underline

func (c *Color) Underline() string

Jump to

Keyboard shortcuts

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