Source File
style.go
Belonging Package
github.com/carapace-sh/carapace/pkg/style
// Package style provide display coloringpackage styleimport ()var (Default = ""Black = "black"Red = "red"Green = "green"Yellow = "yellow"Blue = "blue"Magenta = "magenta"Cyan = "cyan"White = "white"BrightBlack = "bright-black"BrightRed = "bright-red"BrightGreen = "bright-green"BrightYellow = "bright-yellow"BrightBlue = "bright-blue"BrightMagenta = "bright-magenta"BrightCyan = "bright-cyan"BrightWhite = "bright-white"BgBlack = "bg-black"BgRed = "bg-red"BgGreen = "bg-green"BgYellow = "bg-yellow"BgBlue = "bg-blue"BgMagenta = "bg-magenta"BgCyan = "bg-cyan"BgWhite = "bg-white"BgBrightBlack = "bg-bright-black"BgBrightRed = "bg-bright-red"BgBrightGreen = "bg-bright-green"BgBrightYellow = "bg-bright-yellow"BgBrightBlue = "bg-bright-blue"BgBrightMagenta = "bg-bright-magenta"BgBrightCyan = "bg-bright-cyan"BgBrightWhite = "bg-bright-white"Bold = "bold"Dim = "dim"Italic = "italic"Underlined = "underlined"Blink = "blink"Inverse = "inverse")// Of combines different styles.func ( ...string) string { return strings.TrimSpace(strings.Join(, " ")) }// XTerm256Color returns a color from the xterm 256-color palette.func ( uint8) string { return ui.XTerm256Color().String() }// TrueColor returns a 24-bit true color.func (, , uint8) string { return ui.TrueColor(, , ).String() }// SGR returns the SGR sequence for given style.func ( string) string { return Parse().SGR() }func ( string) ui.Style {:= make([]ui.Styling, 0)for := range strings.SplitSeq(, " ") {if := ui.ParseStyling(); != nil {= append(, )}}return ui.ApplyStyling(ui.Style{}, ...)}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |