color

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Bold returns a bold string
	Bold = color.New(color.Bold).SprintFunc()
	// Red returns a red-colored string
	Red = color.New(color.FgRed).SprintFunc()
	// Green returns a green-colored string
	Green = color.New(color.FgGreen).SprintFunc()
	// Yellow returns a yellow-colored string
	Yellow = color.New(color.FgYellow).SprintFunc()
	// Magenta returns a purple-colored string
	Magenta = color.New(color.FgMagenta).SprintFunc()
	// Cyan returns a cyan-colored string
	Cyan = color.New(color.FgCyan).SprintFunc()
	// Underline returns an underline string
	Underline = color.New(color.Underline).SprintFunc()
	// Grey returns a dark grey-colored string
	Grey = color.New(color.FgHiBlack).SprintFunc()

	// Background colored string
	BgYellow  = color.New(color.BgYellow).SprintFunc()
	BgMagenta = color.New(color.BgMagenta).SprintFunc()
	BgRed     = color.New(color.BgRed).SprintFunc()
)

Functions

func IfTrueCyan added in v0.10.0

func IfTrueCyan(condition bool, a ...interface{}) string

func IfTrueGreen added in v0.10.0

func IfTrueGreen(condition bool, a ...interface{}) string

func IfTrueMagenta added in v0.10.0

func IfTrueMagenta(condition bool, a ...interface{}) string

func IfTrueRed added in v0.10.0

func IfTrueRed(condition bool, a ...interface{}) string

func IfTrueYellow added in v0.10.0

func IfTrueYellow(condition bool, a ...interface{}) string

func Is256ColorSupported added in v0.13.0

func Is256ColorSupported() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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