style

package
v0.18.9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package style provide display coloring

Index

Constants

This section is empty.

Variables

View Source
var (
	Default string = ""

	Black   string = "black"
	Red     string = "red"
	Green   string = "green"
	Yellow  string = "yellow"
	Blue    string = "blue"
	Magenta string = "magenta"
	Cyan    string = "cyan"
	White   string = "white"
	Gray    string = Of(Dim, White)

	BrightBlack   string = "bright-black"
	BrightRed     string = "bright-red"
	BrightGreen   string = "bright-green"
	BrightYellow  string = "bright-yellow"
	BrightBlue    string = "bright-blue"
	BrightMagenta string = "bright-magenta"
	BrightCyan    string = "bright-cyan"
	BrightWhite   string = "bright-white"

	BgBlack   string = "bg-black"
	BgRed     string = "bg-red"
	BgGreen   string = "bg-green"
	BgYellow  string = "bg-yellow"
	BgBlue    string = "bg-blue"
	BgMagenta string = "bg-magenta"
	BgCyan    string = "bg-cyan"
	BgWhite   string = "bg-white"

	BgBrightBlack   string = "bg-bright-black"
	BgBrightRed     string = "bg-bright-red"
	BgBrightGreen   string = "bg-bright-green"
	BgBrightYellow  string = "bg-bright-yellow"
	BgBrightBlue    string = "bg-bright-blue"
	BgBrightMagenta string = "bg-bright-magenta"
	BgBrightCyan    string = "bg-bright-cyan"
	BgBrightWhite   string = "bg-bright-white"

	Bold       string = "bold"
	Dim        string = "dim"
	Italic     string = "italic"
	Underlined string = "underlined"
	Blink      string = "blink"
	Inverse    string = "inverse"
)

Functions

func ForPath

func ForPath(path string) string

ForPath returns the style for given path

func Of added in v0.18.2

func Of(s ...string) string

Of combines different styles

func SGR added in v0.18.9

func SGR(s string) string

SGR returns the SGR sequence for given style

func TrueColor added in v0.18.9

func TrueColor(r, g, b uint8) string

TrueColor returns a 24-bit true color.

func XTerm256Color added in v0.18.9

func XTerm256Color(i uint8) string

XTerm256Color returns a color from the xterm 256-color palette.

Types

This section is empty.

Jump to

Keyboard shortcuts

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