Documentation
¶
Overview ¶
Package color
@author: xwc1125
Index ¶
- func Black(str string, modifier ...interface{}) string
- func Blue(str string, modifier ...interface{}) string
- func Brown(str string, modifier ...interface{}) string
- func ColorRender(str string, foregroundColor ForegroundColor, backgroundColor BackgroundColor, ...) string
- func Cyan(str string, modifier ...interface{}) string
- func DarkGray(str string, modifier ...interface{}) string
- func Green(str string, modifier ...interface{}) string
- func LightBlue(str string, modifier ...interface{}) string
- func LightCyan(str string, modifier ...interface{}) string
- func LightGray(str string, modifier ...interface{}) string
- func LightGreen(str string, modifier ...interface{}) string
- func LightPurple(str string, modifier ...interface{}) string
- func LightRed(str string, modifier ...interface{}) string
- func Purple(str string, modifier ...interface{}) string
- func Red(str string, modifier ...interface{}) string
- func White(str string, modifier ...interface{}) string
- func Yellow(str string, modifier ...interface{}) string
- type BackgroundColor
- type ForegroundColor
- type ShowType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorRender ¶
func ColorRender(str string, foregroundColor ForegroundColor, backgroundColor BackgroundColor, extraArgs ...ShowType) string
ColorRender color颜色处理 str 文本 foregroundColor 前景色 backgroundColor 背景色 extraArgs 扩展的显示方式
Types ¶
type BackgroundColor ¶
type BackgroundColor int
const ( BackgroundColor_Transparent BackgroundColor = iota + 39 // 39 BackgroundColor_Black // 40 BackgroundColor_Red // 41 BackgroundColor_Green // 42 BackgroundColor_Yellow // 43 BackgroundColor_Blue // 44 BackgroundColor_Fuchsia // 45 BackgroundColor_Cyan // 46 BackgroundColor_White // 47 )
type ForegroundColor ¶
type ForegroundColor int
const ( ForegroundColor_Black ForegroundColor = iota + 30 // 30 ForegroundColor_Red // 31 ForegroundColor_Green // 32 ForegroundColor_Yellow // 33 ForegroundColor_Blue // 34 ForegroundColor_Purple // 35 ForegroundColor_Cyan // 36 ForegroundColor_White // 37 )
Click to show internal directories.
Click to hide internal directories.