func (p *Printer) Println(a ...interface{}) {
	fmt.Println(RenderCode(p.String(), a...))
}
Println rendering colored messages with newline
package color
import (
	"fmt"
	"regexp"
)
const (
	SettingTpl   = "\x1b[%sm"
	FullColorTpl = "\x1b[%sm%s\x1b[0m"
)
const ResetSet = "\x1b[0m"
const CodeExpr = `\033\[[\d;?]+m`
var Enable = true
var (
	isLikeInCmd bool
	codeRegex = regexp.MustCompile(CodeExpr)
	isSupportColor = IsSupportColor()
)
func Set(colors ...Color) (int, error) {
	if !Enable {  
		return 0, nil
	}
	if isLikeInCmd {
		return winSet(colors...)
	}
	return fmt.Printf(SettingTpl, colors2code(colors...))
}
func Reset() (int, error) {
	if !Enable {  
		return 0, nil
	}
	if isLikeInCmd {
		return winReset()
	}
	return fmt.Print(ResetSet)
}
func Disable() {
	Enable = false
}
func RenderCode(code string, args ...interface{}) string {
	message := fmt.Sprint(args...)
	if len(code) == 0 {
		return message
	}
	if !Enable || !isSupportColor {
		return ClearCode(message)
	}
	return fmt.Sprintf(FullColorTpl, code, message)
}
func RenderString(code string, str string) string {
	if len(code) == 0 || str == "" {
		return str
	}
	if !Enable || !isSupportColor {
		return ClearCode(str)
	}
	return fmt.Sprintf(FullColorTpl, code, str)
}
func ClearCode(str string) string {
	return codeRegex.ReplaceAllString(str, "")
}
type PrinterFace interface {
	fmt.Stringer
	Sprint(a ...interface{}) string
	Sprintf(format string, a ...interface{}) string
	Print(a ...interface{})
	Printf(format string, a ...interface{})
	Println(a ...interface{})
}
type Printer struct {
	ColorCode string
}
func NewPrinter(colorCode string) *Printer {
	return &Printer{colorCode}
}
func (p *Printer) String() string {
	return p.ColorCode
}
func (p *Printer) Sprint(a ...interface{}) string {
	return RenderCode(p.String(), a...)
}
func (p *Printer) Sprintf(format string, a ...interface{}) string {
	return RenderString(p.String(), fmt.Sprintf(format, a...))
}
func (p *Printer) Print(a ...interface{}) {
	fmt.Print(RenderCode(p.String(), a...))
}
func (p *Printer) Printf(format string, a ...interface{}) {
	fmt.Print(RenderString(p.String(), fmt.Sprintf(format, a...)))
}