-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathcolors.go
More file actions
33 lines (26 loc) · 801 Bytes
/
colors.go
File metadata and controls
33 lines (26 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.23
package tui
import (
"github.com/morikuni/aec"
)
var (
ColorTitle = aec.NewBuilder(aec.DefaultF, aec.Bold).ANSI
ColorPrimary = aec.NewBuilder(aec.DefaultF, aec.Bold).ANSI
ColorSecondary = aec.DefaultF
ColorTertiary = aec.NewBuilder(aec.DefaultF, aec.Faint).ANSI
ColorLink = aec.NewBuilder(aec.LightCyanF, aec.Underline).ANSI
ColorWarning = aec.LightYellowF
ColorFlag = aec.NewBuilder(aec.Bold).ANSI
ColorNone = aec.ANSI(noColor{})
)
type noColor struct{}
func (a noColor) With(_ ...aec.ANSI) aec.ANSI {
return a
}
func (noColor) Apply(s string) string {
return s
}
func (noColor) String() string {
return ""
}