MCPcopy Create free account

hub / github.com/aybabtme/rgbterm / functions

Functions40 in github.com/aybabtme/rgbterm

↓ 8 callersFunctioncolor
(r, g, b uint8, foreground bool)
rgbterm.go:105
↓ 7 callersFunctioninterpret
interpret reads from r and writes to w. While reading any color escape codes detected are replaced by the result of calling subst with the escape code
interpret.go:23
↓ 6 callersFunctionbufsForTest
(s string)
interpret_test.go:8
↓ 6 callersFunctionparseEscape
(s string)
interpret.go:82
↓ 5 callersMethodWrite
Write writes to the underlying io.Writer while substituting the color escapes in the input. See Interpret for a description of color escapes.
interpret.go:189
↓ 5 callersFunctioncolorize
(color, in []byte)
rgbterm.go:95
↓ 3 callersFunctionhueToRGB
hueToRGB is a helper function for HSLtoRGB.
util.go:71
↓ 2 callersFunctionInterpret
Interpret reads data from r and writes it to w, while substituting the color escapes in the input. Color escapes are directives having one of forms o
interpret.go:151
↓ 2 callersFunctionNewInterpretingWriter
NewColorTemplateWriter creates a ColorTemplateWriter that writes to w while substituting the color escapes in the input. See Interpret for a descript
interpret.go:177
↓ 1 callersFunctionBgBytes
BgBytes colorizes the background of the input with the terminal color that matches the closest the RGB color.
rgbterm.go:79
↓ 1 callersFunctionBytes
Bytes colorizes the input with the terminal color that matches the closest the RGB color.
rgbterm.go:67
↓ 1 callersFunctionFgBytes
Bytes colorizes the foreground with the terminal color that matches the closest the RGB color.
rgbterm.go:73
↓ 1 callersFunctionNew
New creates a Rainbow writer, wrapping each byte with a new color of the rainbow. This is clearly a good idea! This is especially useful when w is som
rainbow/rainbow.go:19
↓ 1 callersFunctiongrayscale
(scale uint8, foreground bool)
rgbterm.go:126
↓ 1 callersFunctionrgb
(fr, fg, fb, br, bg, bb uint8)
rgbterm.go:99
FunctionBgByte
BgByte colorizes the background of the input with the terminal color that matches the closest the RGB color.
rgbterm.go:91
FunctionBgString
BgString colorizes the background of the input with the terminal color that matches the closest the RGB color. This is simply a helper for Bytes.
rgbterm.go:61
FunctionExampleBgBytes
()
rgbterm_test.go:27
FunctionExampleBytes
()
rgbterm_test.go:8
FunctionExampleNew
()
rainbow/rainbow_test.go:9
FunctionExampleString
()
rgbterm_test.go:46
FunctionFgByte
Byte colorizes the input with the terminal color that matches the closest the RGB color.
rgbterm.go:85
FunctionFgString
FgString colorizes the foreground of the input with the terminal color that matches the closest the RGB color. This is simply a helper for Bytes.
rgbterm.go:53
FunctionHSLtoRGB
HSLtoRGB is a helper that transforms 8bits RGB colors to 8bits HSL colors.
util.go:48
FunctionInterpretStr
ColorizeTemplate substitutes the color escapes in the string s and returns the resulting string. See Interpret for a description of color escapes.
interpret.go:159
FunctionRGBtoHSL
stolen from gorilla color: https://code.google.com/p/gorilla/source/browse/?r=ef489f63418265a7249b1d53bdc358b09a4a2ea0#hg%2Fcolor RGBtoHSL is a helper
util.go:12
FunctionString
String colorizes the input with the terminal color that matches the closest the RGB color. This is simply a helper for Bytes.
rgbterm.go:45
FunctionTestInterpretEmptyReplace
(t *testing.T)
interpret_test.go:67
FunctionTestInterpretNilReplace
(t *testing.T)
interpret_test.go:93
FunctionTestInterpretNoEscapes
(t *testing.T)
interpret_test.go:14
FunctionTestInterpretOutputBrace
(t *testing.T)
interpret_test.go:40
FunctionTestInterpretReplaceTooLong
(t *testing.T)
interpret_test.go:153
FunctionTestInterpretSomeReplaces
(t *testing.T)
interpret_test.go:123
FunctionTestParseBgEscape
(t *testing.T)
interpret_test.go:221
FunctionTestParseEmptyEscape
(t *testing.T)
interpret_test.go:181
FunctionTestParseFgBgEscape
(t *testing.T)
interpret_test.go:209
FunctionTestParseFgEscape
(t *testing.T)
interpret_test.go:197
FunctionTestParseInvalidEscape
(t *testing.T)
interpret_test.go:189
MethodWrite
Write wraps each byte with an RGB color. Weeee!
rainbow/rainbow.go:25
FunctionsubstColor
(s string)
interpret.go:105