color.gno

1.02 Kb ยท 81 lines
 1package printfdebugging
 2
 3// consts copied from https://github.com/fatih/color/blob/main/color.go
 4
 5// Attribute defines a single SGR Code
 6type Attribute int
 7
 8const Escape = "\x1b"
 9
10// Base attributes
11const (
12	Reset Attribute = iota
13	Bold
14	Faint
15	Italic
16	Underline
17	BlinkSlow
18	BlinkRapid
19	ReverseVideo
20	Concealed
21	CrossedOut
22)
23
24const (
25	ResetBold Attribute = iota + 22
26	ResetItalic
27	ResetUnderline
28	ResetBlinking
29	_
30	ResetReversed
31	ResetConcealed
32	ResetCrossedOut
33)
34
35// Foreground text colors
36const (
37	FgBlack Attribute = iota + 30
38	FgRed
39	FgGreen
40	FgYellow
41	FgBlue
42	FgMagenta
43	FgCyan
44	FgWhite
45)
46
47// Foreground Hi-Intensity text colors
48const (
49	FgHiBlack Attribute = iota + 90
50	FgHiRed
51	FgHiGreen
52	FgHiYellow
53	FgHiBlue
54	FgHiMagenta
55	FgHiCyan
56	FgHiWhite
57)
58
59// Background text colors
60const (
61	BgBlack Attribute = iota + 40
62	BgRed
63	BgGreen
64	BgYellow
65	BgBlue
66	BgMagenta
67	BgCyan
68	BgWhite
69)
70
71// Background Hi-Intensity text colors
72const (
73	BgHiBlack Attribute = iota + 100
74	BgHiRed
75	BgHiGreen
76	BgHiYellow
77	BgHiBlue
78	BgHiMagenta
79	BgHiCyan
80	BgHiWhite
81)