func Magentaf(format string, a ...interface{}) string {
	return colType(Magenta(fmt.Sprintf(format, a...)))
}
Magentaf returns a Magenta formatted string.
package term
import (
	"errors"
	"fmt"
	"math/rand"
	"strconv"
)
type stringer interface {
	String() string
}
var colorEnable = true
func ColorEnable() {
	colorEnable = true
}
func ColorDisable() {
	colorEnable = false
}
const (
	CSI       = "\033["
	FgBlack   = "30"
	FgRed     = "31"
	FgGreen   = "32"
	FgYellow  = "33"
	FgBlue    = "34"
	FgMagenta = "35"
	FgCyan    = "36"
	FgWhite   = "37"
	FgDefault = "39"
	F256      = "38"
	BgBlack   = "40"
	BgRed     = "41"
	BgGreen   = "42"
	BgYellow  = "43"
	BgBlue    = "44"
	BgMagenta = "45"
	BgCyan    = "46"
	BgWhite   = "47"
	BgDefault = "49"
	Bg256     = "48"
	Blink     = "5"
	Ital      = "3"
	Underln   = "4"
	Faint     = "2"
	Bld       = "1"
	NoMode    = "0"
)
type Green string
type Blue string
type Red string
type Yellow string
type Magenta string
type Cyan string
type White string
type Black string
type Random string
type BGreen string
type BBlue string
type BRed string
type BYellow string
type BRandom string
type BMagenta string
type BCyan string
type BWhite string
type BBlack string
type Color string
type ColorRandom string
type Color256Random string
type Blinking string
type Underline string
type Bold string
type Italic string
func colType(col stringer) string {
	nMode := FgDefault
	var mode, res string
	switch c := col.(type) {
	case Black:
		mode = FgBlack
		res = string(c)
	case Red:
		mode = FgRed
		res = string(c)
	case Green:
		mode = FgGreen
		res = string(c)
	case Yellow:
		mode = FgYellow
		res = string(c)
	case Blue:
		mode = FgBlue
		res = string(c)
	case Magenta:
		mode = FgMagenta
		res = string(c)
	case Cyan:
		mode = FgCyan
		res = string(c)
	case White:
		mode = FgWhite
		res = string(c)
	case BBlack:
		mode = BgBlack
		res = string(c)
	case BRed:
		mode = BgRed
		nMode = BgDefault
		res = string(c)
	case BGreen:
		mode = BgGreen
		nMode = BgDefault
		res = string(c)
	case BYellow:
		mode = BgYellow
		nMode = BgDefault
		res = string(c)
	case BBlue:
		mode = BgBlue
		nMode = BgDefault
		res = string(c)
	case BMagenta:
		mode = BgMagenta
		nMode = BgDefault
		res = string(c)
	case BCyan:
		mode = BgCyan
		nMode = BgDefault
		res = string(c)
	case BWhite:
		mode = BgWhite
		nMode = BgDefault
		res = string(c)
	case Blinking:
		mode = Blink
		nMode = NoMode
		res = string(c)
	case Italic:
		mode = Ital
		nMode = NoMode
		res = string(c)
	case Underline:
		mode = Underln
		nMode = NoMode
		res = string(c)
	case Bold:
		nMode = NoMode
		mode = Bld
		res = string(c)
	default:
		return "unsupported type"
	}
	if !colorEnable {
		return res
	}
	return CSI + mode + "m" + res + CSI + nMode + "m"
}
func (c Green) String() string {
	return colType(c)
}
func Greenf(format string, a ...interface{}) string {
	return colType(Green(fmt.Sprintf(format, a...)))
}
func (c Blue) String() string {
	return colType(c)
}
func Bluef(format string, a ...interface{}) string {
	return colType(Blue(fmt.Sprintf(format, a...)))
}
func (c Red) String() string {
	return colType(c)
}
func Redf(format string, a ...interface{}) string {
	return colType(Red(fmt.Sprintf(format, a...)))
}
func (c Yellow) String() string {
	return colType(c)
}
func Yellowf(format string, a ...interface{}) string {
	return colType(Yellow(fmt.Sprintf(format, a...)))
}
func (c Magenta) String() string {
	return colType(c)
}