Documentation ¶
Index ¶
- Constants
- Variables
- func Blue(s string) string
- func ColorDepth() (int, error)
- func Custom(begin, end any) func(text string) string
- func EnableColor() bool
- func Gradient(text string, begin, end color) string
- func Gray(s string) string
- func Green(s string) string
- func LightGreen(s string) string
- func Move(n int, direction direction) string
- func MultiLineGradient(text string, begin, end color) string
- func MultiLineRainbow(text string) string
- func MultiLineRandomGradient(text string) string
- func NewColor(r, g, b byte) color
- func Purple(s string) string
- func RGBFormat(text string, r, g, b byte) string
- func Rainbow(text string) string
- func RandomGradient(text string) string
- func Red(s string) string
- func RedBackground(s string) string
- func SetPosition(x, y int) string
- func StyleFormat(s string, styles ...Style) string
- func Yellow(s string) string
- type Style
Constants ¶
View Source
const ( DirectionUp direction = "A" DirectionDown direction = "B" DirectionRight direction = "C" DirectionLeft direction = "D" )
View Source
const ( OperationSave operation = "s" OperationRestore operation = "u" OperationClear operation = "2J" OperationClearLineTail operation = "K" OperationHide operation = "?25l" OperationDisplay operation = "?25h" )
Variables ¶
View Source
var ( RainbowColor = [...]color{RainbowRed, RainbowOrange, RainbowYellow, RainbowGreen, RainbowCyan, RainbowBlue, RainbowPurple} RainbowRed = NewColor(255, 0, 0) RainbowOrange = NewColor(255, 165, 0) RainbowYellow = NewColor(255, 255, 0) RainbowGreen = NewColor(0, 255, 0) RainbowCyan = NewColor(0, 255, 255) RainbowBlue = NewColor(0, 0, 255) RainbowPurple = NewColor(128, 0, 128) )
Functions ¶
func ColorDepth ¶ added in v1.5.11
func EnableColor ¶ added in v1.5.11
func EnableColor() bool
func LightGreen ¶
func MultiLineGradient ¶ added in v1.9.3
func MultiLineRainbow ¶ added in v1.9.3
func MultiLineRandomGradient ¶ added in v1.9.3
func RandomGradient ¶ added in v1.9.3
func RedBackground ¶
func SetPosition ¶ added in v1.0.6
func StyleFormat ¶ added in v1.0.6
Types ¶
Click to show internal directories.
Click to hide internal directories.