Documentation ¶
Index ¶
Constants ¶
View Source
const ( KindEmpty Kind = iota KindText KindColor KindNotColor ColorTypeReset ColorType = iota // \x1b[0m 指定をリセット ColorTypeBold // \x1b[1m 太字 ColorTypeDim // \x1b[2m 薄く表示 ColorTypeItalic // \x1b[3m イタリック ColorTypeUnderline // \x1b[4m アンダーライン ColorTypeBlink // \x1b[5m ブリンク ColorTypeSpeedyBlink // \x1b[6m 高速ブリンク ColorTypeReverse // \x1b[7m 文字色と背景色の反転 ColorTypeHide // \x1b[8m 表示を隠す ColorTypeDelete // \x1b[9m 取り消し ColorTypeForeground ColorTypeBackground )
Variables ¶
View Source
var ( RGBABlack = RGBA{0, 0, 0, 255} RGBARed = RGBA{255, 0, 0, 255} RGBAGreen = RGBA{0, 255, 0, 255} RGBAYellow = RGBA{255, 255, 0, 255} RGBABlue = RGBA{0, 0, 255, 255} RGBAMagenta = RGBA{255, 0, 255, 255} RGBACyan = RGBA{0, 255, 255, 255} RGBALightGray = RGBA{211, 211, 211, 255} RGBADarkGray = RGBA{169, 169, 169, 255} RGBALightRed = RGBA{255, 144, 144, 255} RGBALightGreen = RGBA{144, 238, 144, 255} RGBALightYellow = RGBA{255, 255, 224, 255} RGBALightBlue = RGBA{173, 216, 230, 255} RGBALightMagenta = RGBA{255, 224, 255, 255} RGBALightCyan = RGBA{224, 255, 255, 255} RGBAWhite = RGBA{255, 255, 255, 255} StringMap = map[string]RGBA{ "black": RGBABlack, "red": RGBARed, "green": RGBAGreen, "yellow": RGBAYellow, "blue": RGBABlue, "magenta": RGBAMagenta, "cyan": RGBACyan, "white": RGBAWhite, } // \x1b[NNm とかの NN に紐づくRGBA色 // 例: \x1b[30m ANSIMap = map[int]RGBA{ 30: RGBABlack, 31: RGBARed, 32: RGBAGreen, 33: RGBAYellow, 34: RGBABlue, 35: RGBAMagenta, 36: RGBACyan, 37: RGBALightGray, 90: RGBADarkGray, 91: RGBALightRed, 92: RGBALightGreen, 93: RGBALightYellow, 94: RGBALightBlue, 95: RGBALightMagenta, 96: RGBALightCyan, 97: RGBAWhite, 40: RGBABlack, 41: RGBARed, 42: RGBAGreen, 43: RGBAYellow, 44: RGBABlue, 45: RGBAMagenta, 46: RGBACyan, 47: RGBALightGray, 100: RGBADarkGray, 101: RGBALightRed, 102: RGBALightGreen, 103: RGBALightYellow, 104: RGBALightBlue, 105: RGBALightMagenta, 106: RGBALightCyan, 107: RGBAWhite, } // \x1b[38;5;NNNm とかの NNN に紐づくRGBA色 // 例: \x1b[38;5;114m Map256 = map[int]RGBA{}/* 256 elements not displayed */ )
View Source
var ( // \x1b[Nm とかの N に紐づく色種別 // 例: \x1b[0m AttributeMap = map[int]ColorType{ 0: ColorTypeReset, 1: ColorTypeBold, 2: ColorTypeDim, 3: ColorTypeItalic, 4: ColorTypeUnderline, 5: ColorTypeBlink, 6: ColorTypeSpeedyBlink, 7: ColorTypeReverse, 8: ColorTypeHide, 9: ColorTypeDelete, } )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.