diff --git a/iostreams/color.go b/iostreams/color.go index 31b155d1c..ba4006b00 100644 --- a/iostreams/color.go +++ b/iostreams/color.go @@ -224,8 +224,12 @@ func (c *ColorScheme) ColorFromString(s string) func(string) string { case "blue": fn = c.Blue default: - fn = func(s string) string { - return s + if c.enabled { + fn = ansi.ColorFunc(s) + } else { + fn = func(s string) string { + return s + } } }