colour

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FgBlack   = "\x1b[30m"
	FgRed     = "\x1b[31m"
	FgGreen   = "\x1b[32m"
	FgYellow  = "\x1b[33m"
	FgBlue    = "\x1b[34m"
	FgMagenta = "\x1b[35m"
	FgCyan    = "\x1b[36m"
	FgWhite   = "\x1b[37m"
)

Base Colours

View Source
const (
	Reset      = "\x1b[0m"
	Bold       = "\x1b[1m"
	Underscore = "\x1b[4m"
	Reverse    = "\x1b[7m"
	Hidden     = "\x1b[8m"
)

Text Attributes

Variables

This section is empty.

Functions

func Black

func Black(format string, a ...interface{}) (n int, err error)

Black Printf with the colour black

func BlackString

func BlackString(format string) string

BlackString formats string with black text

func BlackTitle

func BlackTitle(format string, a ...interface{}) (n int, err error)

BlackTitle Printf with bold black

func Blue

func Blue(format string, a ...interface{}) (n int, err error)

Blue Printf with the blue

func BlueString

func BlueString(format string) string

BlueString formats string with blue text

func BlueTitle

func BlueTitle(format string, a ...interface{}) (n int, err error)

BlueTitle Printf with bold blue

func Cyan

func Cyan(format string, a ...interface{}) (n int, err error)

Cyan Printf with the cyan

func CyanString

func CyanString(format string) string

CyanString formats string with cyan text

func CyanTitle

func CyanTitle(format string, a ...interface{}) (n int, err error)

CyanTitle Printf with bold cyan

func Green

func Green(format string, a ...interface{}) (n int, err error)

Green Printf with the colour green

func GreenString

func GreenString(format string) string

GreenString formats string with green text

func GreenTitle

func GreenTitle(format string, a ...interface{}) (n int, err error)

GreenTitle Printf with bold green

func Magenta

func Magenta(format string, a ...interface{}) (n int, err error)

Magenta Printf with the magenta

func MagentaString

func MagentaString(format string) string

MagentaString formats string with magenta text

func MagentaTitle

func MagentaTitle(format string, a ...interface{}) (n int, err error)

MagentaTitle Printf with bold magenta

func Red

func Red(format string, a ...interface{}) (n int, err error)

Red Printf with the colour red

func RedString

func RedString(format string) string

RedString formats string with red text

func RedTitle

func RedTitle(format string, a ...interface{}) (n int, err error)

RedTitle Printf with bold red

func Status

func Status(statuscode int) (status string)

Status colour code statuscodes

func String

func String(format string, value ...string) string

String formats string with coloured text

func White

func White(format string, a ...interface{}) (n int, err error)

White Printf with the white

func WhiteString

func WhiteString(format string) string

WhiteString formats string with white text

func WhiteTitle

func WhiteTitle(format string, a ...interface{}) (n int, err error)

WhiteTitle Printf with bold white

func Yellow

func Yellow(format string, a ...interface{}) (n int, err error)

Yellow Printf with the colour yellow

func YellowString

func YellowString(format string) string

YellowString formats string with yellow text

func YellowTitle

func YellowTitle(format string, a ...interface{}) (n int, err error)

YellowTitle Printf with bold yellow

Types

This section is empty.

Jump to

Keyboard shortcuts

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