style

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ColorWhite         Color = 0
	ColorRed                 = 31
	ColorGreen               = 32
	ColorYellow              = 33
	ColorBlue                = 34
	ColorPurple              = 35
	ColorLightGreen          = 36
	ColorGray                = 37
	ColorRedBackground       = 41
)

Variables

This section is empty.

Functions

func Blue

func Blue(s string) string

func Gray

func Gray(s string) string

func Green

func Green(s string) string

func LightGreen

func LightGreen(s string) string

func Purple

func Purple(s string) string

func Red

func Red(s string) string

func RedBackground

func RedBackground(s string) string

func Style

func Style(colorCode Color, s string, wordFormats ...Decoration) string

func White

func White(s string) string

func Yellow

func Yellow(s string) string

Types

type Color

type Color int

func (Color) String

func (c Color) String() string

type Decoration

type Decoration int
const (
	Normal Decoration = iota
	Bold
	Italic
	Underline
)

func (Decoration) String

func (d Decoration) String() string

Jump to

Keyboard shortcuts

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