colors

package
v6.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 2 Imported by: 4

Documentation

Overview

Package colors provides simple tools for coloring command line output

Index

Constants

This section is empty.

Variables

View Source
var Black = "\033[30m"
View Source
var Blue = "\033[34m"
View Source
var Bright = "\033[1m"
View Source
var BrightBlack = (Bright + Black)
View Source
var BrightBlue = (Bright + Blue)
View Source
var BrightCyan = (Bright + Cyan)
View Source
var BrightGreen = (Bright + Green)
View Source
var BrightMagenta = (Bright + Magenta)
View Source
var BrightRed = (Bright + Red)
View Source
var BrightWhite = (Bright + White)
View Source
var BrightYellow = (Bright + Yellow)
View Source
var ColorMap = map[string]string{
	"off":           Off,
	"red":           Red,
	"green":         Green,
	"yellow":        Yellow,
	"blue":          Blue,
	"magenta":       Magenta,
	"cyan":          Cyan,
	"white":         White,
	"black":         Black,
	"brightred":     BrightRed,
	"brightgreen":   BrightGreen,
	"brightyellow":  BrightYellow,
	"brightblue":    BrightBlue,
	"brightmagenta": BrightMagenta,
	"brightcyan":    BrightCyan,
	"brightwhite":   BrightWhite,
	"brightblack":   BrightBlack,
}
View Source
var Cyan = "\033[36m"
View Source
var Green = "\033[32m"
View Source
var Magenta = "\033[35m"
View Source
var None = ""
View Source
var Off = "\033[0m"
View Source
var Red = "\033[31m"
View Source
var White = "\033[37m"
View Source
var Yellow = "\033[33m"

Functions

func Colored

func Colored(s string) string

func ColoredWith

func ColoredWith(s string, c string) string

func ColorsOff

func ColorsOff()

func ColorsOn

func ColorsOn()

Types

This section is empty.

Jump to

Keyboard shortcuts

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