INNER CODE UNIT · Go
Color
hidetatz/kubecolor · color/color.go:12
Black Color = iota + 30
Red
Green
Yellow
Blue
Magenta
Cyan
White
)
func (c Color) sequence() int {
return int(c)
}
func Apply(val string, c Color) string {
return fmt.Sprintf("%s[%dm%s%s[0m", escape, c.sequence(), val, escape)
}