Merge f19125bedd
into 82a9122745
This commit is contained in:
commit
8760a362b3
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue