package codes

import "golazy.dev/lazytui/encoding/ansi/codes"

Package codes defines ANSI, ECMA-48, and common terminal extension codes.

The package intentionally contains constants and small value helpers only. Stateful parsing and rendering belong in golazy.dev/lazytui/encoding/ansi.

Constants

Variables

var Reset, Bold, Faint, Italic, Underline, Blink, Inverse, Conceal, CrossedOut, NormalIntensity, NoItalic, NoUnderline, NoBlink, Positive, Reveal, NotCrossedOut, DefaultFg, DefaultBg, Framed, Encircled, Overline, NoFrameCircle, NoOverline

var (
	Reset		= SGR{0}
	Bold		= SGR{1}
	Faint		= SGR{2}
	Italic		= SGR{3}
	Underline	= SGR{4}
	Blink		= SGR{5}
	Inverse		= SGR{7}
	Conceal		= SGR{8}
	CrossedOut	= SGR{9}
	NormalIntensity	= SGR{22}
	NoItalic	= SGR{23}
	NoUnderline	= SGR{24}
	NoBlink		= SGR{25}
	Positive	= SGR{27}
	Reveal		= SGR{28}
	NotCrossedOut	= SGR{29}
	DefaultFg	= SGR{39}
	DefaultBg	= SGR{49}
	Framed		= SGR{51}
	Encircled	= SGR{52}
	Overline	= SGR{53}
	NoFrameCircle	= SGR{54}
	NoOverline	= SGR{55}
)

Types

type SGR

SGR is a Select Graphic Rendition parameter sequence.

type SGR []int
func Bg256

Bg256 selects an indexed background color.

func Bg256(index uint8) SGR
func BgRGB

BgRGB selects a truecolor background color.

func BgRGB(r, g, b uint8) SGR
func Fg256

Fg256 selects an indexed foreground color.

func Fg256(index uint8) SGR
func FgRGB

FgRGB selects a truecolor foreground color.

func FgRGB(r, g, b uint8) SGR