ansi_escape_codes

package module
v0.0.0-...-a7755fb Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: BSD-3-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ANSI escape codes

This golang package contains some ANSI escape codes that are compatibles with Windows, mainly text formatting codes

Sources

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ANSICode

type ANSICode string
const (
	ESC ANSICode = "\u001b"
	CSI ANSICode = ESC + "["
)

type CSISequence

type CSISequence []ANSICode
var (
	/* Decorations */
	Reset       CSISequence = CSISequence{"0", "m"}
	Bold        CSISequence = CSISequence{"1", "m"}
	Bright                  = Bold
	Underline   CSISequence = CSISequence{"4", "m"}
	Negative    CSISequence = CSISequence{"7", "m"}
	Reverse                 = Negative
	NoUnderline CSISequence = CSISequence{"24", "m"}
	NoNegative  CSISequence = CSISequence{"24", "m"}
	NoReverse               = NoNegative
	Positive                = NoNegative

	/* Foreground */
	FgBlack         CSISequence = CSISequence{"30", "m"}
	FgRed           CSISequence = CSISequence{"31", "m"}
	FgGreen         CSISequence = CSISequence{"32", "m"}
	FgYellow        CSISequence = CSISequence{"33", "m"}
	FgBlue          CSISequence = CSISequence{"34", "m"}
	FgMagenta       CSISequence = CSISequence{"35", "m"}
	FgCyan          CSISequence = CSISequence{"36", "m"}
	FgWhite         CSISequence = CSISequence{"37", "m"}
	FgExtendedColor CSISequence = CSISequence{"38", "m"}
	FgDefaultColor  CSISequence = CSISequence{"39", "m"}
	FgBrightBlack   CSISequence = CSISequence{"90", "m"}
	FgBrightRed     CSISequence = CSISequence{"91", "m"}
	FgBrightGreen   CSISequence = CSISequence{"92", "m"}
	FgBrightYellow  CSISequence = CSISequence{"93", "m"}
	FgBrightBlue    CSISequence = CSISequence{"94", "m"}
	FgBrightMagenta CSISequence = CSISequence{"95", "m"}
	FgBrightCyan    CSISequence = CSISequence{"96", "m"}
	FgBrightWhite   CSISequence = CSISequence{"97", "m"}

	/* Background */
	BgBlack         CSISequence = CSISequence{"40", "m"}
	BgRed           CSISequence = CSISequence{"41", "m"}
	BgGreen         CSISequence = CSISequence{"42", "m"}
	BgYellow        CSISequence = CSISequence{"43", "m"}
	BgBlue          CSISequence = CSISequence{"44", "m"}
	BgMagenta       CSISequence = CSISequence{"45", "m"}
	BgCyan          CSISequence = CSISequence{"46", "m"}
	BgWhite         CSISequence = CSISequence{"47", "m"}
	BgExtendedColor CSISequence = CSISequence{"48", "m"}
	BgDefaultColor  CSISequence = CSISequence{"49", "m"}
	BgBrightBlack   CSISequence = CSISequence{"100", "m"}
	BgBrightRed     CSISequence = CSISequence{"101", "m"}
	BgBrightGreen   CSISequence = CSISequence{"102", "m"}
	BgBrightYellow  CSISequence = CSISequence{"103", "m"}
	BgBrightBlue    CSISequence = CSISequence{"104", "m"}
	BgBrightMagenta CSISequence = CSISequence{"105", "m"}
	BgBrightCyan    CSISequence = CSISequence{"106", "m"}
	BgBrightWhite   CSISequence = CSISequence{"107", "m"}
)

func ExtendedColor

func ExtendedColor(code uint8, background bool) CSISequence

func RGBColor

func RGBColor(r, g, b uint8, background bool) CSISequence

func (CSISequence) Compose

func (s1 CSISequence) Compose(s2 CSISequence) CSISequence

func (CSISequence) ParamsString

func (s CSISequence) ParamsString() string

func (CSISequence) String

func (s CSISequence) String() string

Directories

Path Synopsis
cmd
rgb_colors_demo command

Jump to

Keyboard shortcuts

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