diff --git a/style/style.go b/style/style.go index 5ee9815..2a4a303 100644 --- a/style/style.go +++ b/style/style.go @@ -12,6 +12,7 @@ import ( const KEY_STYLE_NAME = 0 const KEY_STYLE_COLOR = 1 const KEY_STYLE_OPTION = 2 +const COLOR_OFF = "\\033[m" var defStyle *Style = &Style{color: color.HEXStyle("#ffffff"), Name: "default"} @@ -29,11 +30,11 @@ type Styles struct { } func (s *Style) Echof(format string, a ...any) { - s.color.Printf(format, a...) + s.color.Printf(format+COLOR_OFF, a...) } func (s *Style) Applyf(format string, a ...any) string { - return s.color.Sprintf(format, a...) + return s.color.Sprintf(format+COLOR_OFF, a...) } func (s *Style) Echo(data string) {