diff --git a/output.go b/output.go index 42531b4..044d193 100644 --- a/output.go +++ b/output.go @@ -158,4 +158,7 @@ type ConsoleWriter interface { // SetColor sets text and background colors. and specify whether text is bold. SetColor(fg, bg Color, bold bool) + + // SetColorFormat sets text and background colors. and format + SetColorFormat(fg, bg Color, format DisplayAttribute) } diff --git a/output_vt100.go b/output_vt100.go index 20850fe..6065e6e 100644 --- a/output_vt100.go +++ b/output_vt100.go @@ -219,6 +219,12 @@ func (w *VT100Writer) SetColor(fg, bg Color, bold bool) { } } +// SetColorFormat sets text and background colors. and format +func (w *VT100Writer) SetColorFormat(fg, bg Color, format DisplayAttribute) { + w.SetDisplayAttributes(fg, bg, format) + return +} + // SetDisplayAttributes to set VT100 display attributes. func (w *VT100Writer) SetDisplayAttributes(fg, bg Color, attrs ...DisplayAttribute) { w.WriteRaw([]byte{0x1b, '['}) // control sequence introducer