Add purple to the list of colorstring codes
This is the first color code introduced for 256 color terminals, and should be a safe addition when considering the oldest supported platform.
This commit is contained in:
parent
58cba1dea3
commit
4b97411890
|
@ -250,8 +250,14 @@ func (m *Meta) StateOutPath() string {
|
||||||
|
|
||||||
// Colorize returns the colorization structure for a command.
|
// Colorize returns the colorization structure for a command.
|
||||||
func (m *Meta) Colorize() *colorstring.Colorize {
|
func (m *Meta) Colorize() *colorstring.Colorize {
|
||||||
|
colors := make(map[string]string)
|
||||||
|
for k, v := range colorstring.DefaultColors {
|
||||||
|
colors[k] = v
|
||||||
|
}
|
||||||
|
colors["purple"] = "38;5;57"
|
||||||
|
|
||||||
return &colorstring.Colorize{
|
return &colorstring.Colorize{
|
||||||
Colors: colorstring.DefaultColors,
|
Colors: colors,
|
||||||
Disable: !m.color,
|
Disable: !m.color,
|
||||||
Reset: true,
|
Reset: true,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue