style

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrimaryFrameColor = gocui.ColorWhite
	FocusedFrameColor = gocui.ColorGreen

	PrimaryTitleColor = gocui.ColorWhite | gocui.AttrNone
	FocusedTitleColor = gocui.ColorGreen | gocui.AttrBold

	// Tab styling
	FocusedActiveTabColor = gocui.ColorGreen | gocui.AttrBold
	PrimaryActiveTabColor = gocui.ColorGreen | gocui.AttrNone

	// List selection colour
	SelectionBgColor = gocui.ColorBlue
)

Frame and title colour constants shared across all panels/contexts.

View Source
var DefaultFrameRunes = []rune{'─', '│', '╭', '╮', '╰', '╯'}

DefaultFrameRunes defines the standard rounded-corner frame characters used by all panels and contexts.

Functions

func Blue

func Blue(text string) string

Blue colours text blue (ANSI 34).

func Bold

func Bold(text string) string

Bold makes text bold (ANSI 1).

func Cyan

func Cyan(text string) string

Cyan colours text cyan (ANSI 36).

func CyanBold

func CyanBold(text string) string

CyanBold colours text cyan and makes it bold.

func Gray

func Gray(text string) string

Gray colours text gray (256-colour ANSI 240).

func Green

func Green(text string) string

Green colours text green (ANSI 32).

func GreenBold

func GreenBold(text string) string

GreenBold colours text green and makes it bold.

func Magenta

func Magenta(text string) string

Magenta colours text magenta (ANSI 35).

func Orange

func Orange(text string) string

Orange colours text orange (256-colour ANSI 208).

func OrangeBold

func OrangeBold(text string) string

OrangeBold colours text orange and makes it bold.

func Red

func Red(text string) string

Red colours text red (ANSI 31).

func RedBold

func RedBold(text string) string

RedBold colours text red and makes it bold.

func Stylize

func Stylize(text string, fgCode string, bold bool) string

Stylize applies combined ANSI styling (foreground colour code + bold flag). fgCode is a raw ANSI colour code such as "31" (red) or "38;5;208" (orange). If both fgCode and bold are empty/false the original text is returned unchanged.

func Yellow

func Yellow(text string) string

Yellow colours text yellow (ANSI 33).

func YellowBold

func YellowBold(text string) string

YellowBold colours text yellow and makes it bold.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL