styles

package
v1.9.16 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Primary colors
	ColorAccentBlue      = "#7AA2F7" // Soft blue
	ColorMutedBlue       = "#8B95C1" // Dark blue-grey
	ColorBackgroundAlt   = "#24283B" // Slightly lighter background
	ColorBorderSecondary = "#6B75A8" // Dark blue-grey
	ColorTextPrimary     = "#C0CAF5" // Light blue-white
	ColorTextSecondary   = "#9AA5CE" // Medium blue-grey
	ColorSuccessGreen    = "#9ECE6A" // Soft green
	ColorErrorRed        = "#F7768E" // Soft red
	ColorWarningYellow   = "#E0AF68" // Soft yellow

	// Spinner glow colors (transition from base blue towards white)
	ColorSpinnerDim       = "#9AB8F9" // Lighter blue
	ColorSpinnerBright    = "#B8CFFB" // Much lighter blue
	ColorSpinnerBrightest = "#D6E5FC" // Very light blue, near white

	// Background colors
	ColorBackground = "#1A1B26" // Dark blue-black

	// Status colors
	ColorInfoCyan = "#7DCFFF" // Soft cyan

	// Badge colors
	ColorAgentBadge    = "#BB9AF7" // Soft purple
	ColorTransferBadge = "#7DCFFF" // Soft cyan

	// Diff colors
	ColorDiffAddBg    = "#20303B" // Dark blue-green
	ColorDiffRemoveBg = "#3C2A2A" // Dark red-brown

	// Line number and UI element colors
	ColorLineNumber = "#565F89" // Muted blue-grey (same as ColorMutedBlue)
	ColorSeparator  = "#414868" // Dark blue-grey (same as ColorBorderSecondary)

	// Word-level diff highlight colors (visible but not harsh)
	ColorDiffWordAddBg    = "#2D4F3F" // Medium dark teal with green tint
	ColorDiffWordRemoveBg = "#4F2D3A" // Medium dark burgundy with red tint

	// Interactive element colors
	ColorSelected = "#364A82" // Dark blue for selected items
	ColorHover    = "#2D3F5F" // Slightly lighter than selected
)

Color hex values (used throughout the file)

View Source
const (
	ChromaErrorFgColor             = "#F1F1F1"
	ChromaSuccessColor             = "#00D787"
	ChromaErrorBgColor             = "#F05B5B"
	ChromaCommentColor             = "#676767"
	ChromaCommentPreprocColor      = "#FF875F"
	ChromaKeywordColor             = "#00AAFF"
	ChromaKeywordReservedColor     = "#FF5FD2"
	ChromaKeywordNamespaceColor    = "#FF5F87"
	ChromaKeywordTypeColor         = "#6E6ED8"
	ChromaOperatorColor            = "#EF8080"
	ChromaPunctuationColor         = "#E8E8A8"
	ChromaNameBuiltinColor         = "#FF8EC7"
	ChromaNameTagColor             = "#B083EA"
	ChromaNameAttributeColor       = "#7A7AE6"
	ChromaNameDecoratorColor       = "#FFFF87"
	ChromaLiteralNumberColor       = "#6EEFC0"
	ChromaLiteralStringColor       = "#C69669"
	ChromaLiteralStringEscapeColor = "#AFFFD7"
	ChromaGenericDeletedColor      = "#FD5B5B"
	ChromaGenericSubheadingColor   = "#777777"
	ChromaBackgroundColor          = "#373737"
)

Chroma syntax highlighting colors (Monokai theme)

View Source
const (
	ANSIColor252 = "252"
	ANSIColor39  = "39"
	ANSIColor63  = "63"
	ANSIColor35  = "35"
	ANSIColor212 = "212"
	ANSIColor243 = "243"
	ANSIColor244 = "244"
)

ANSI color codes (8-bit color codes)

Variables

View Source
var (
	// Background colors
	Background    = lipgloss.Color(ColorBackground)
	BackgroundAlt = lipgloss.Color(ColorBackgroundAlt)

	// Primary accent colors
	Accent    = lipgloss.Color(ColorAccentBlue)
	AccentDim = lipgloss.Color(ColorMutedBlue)

	// Status colors - softer, more professional
	Success = lipgloss.Color(ColorSuccessGreen)
	Error   = lipgloss.Color(ColorErrorRed)
	Warning = lipgloss.Color(ColorWarningYellow)
	Info    = lipgloss.Color(ColorInfoCyan)

	// Text hierarchy
	TextPrimary   = lipgloss.Color(ColorTextPrimary)
	TextSecondary = lipgloss.Color(ColorTextSecondary)
	TextMuted     = lipgloss.Color(ColorMutedBlue)
	TextSubtle    = lipgloss.Color(ColorBorderSecondary)

	// Border colors
	BorderPrimary   = lipgloss.Color(ColorAccentBlue)
	BorderSecondary = lipgloss.Color(ColorBorderSecondary)
	BorderMuted     = lipgloss.Color(ColorBackgroundAlt)
	BorderWarning   = lipgloss.Color(ColorWarningYellow)
	BorderError     = lipgloss.Color(ColorErrorRed)

	// Diff colors (matching glamour/markdown "dark" theme)
	DiffAddBg    = lipgloss.Color(ColorDiffAddBg)
	DiffRemoveBg = lipgloss.Color(ColorDiffRemoveBg)
	DiffAddFg    = lipgloss.Color(ColorSuccessGreen)
	DiffRemoveFg = lipgloss.Color(ColorErrorRed)

	// UI element colors
	LineNumber = lipgloss.Color(ColorLineNumber)
	Separator  = lipgloss.Color(ColorSeparator)

	// Interactive element colors
	Selected         = lipgloss.Color(ColorSelected)
	SelectedFg       = lipgloss.Color(ColorTextPrimary)
	Hover            = lipgloss.Color(ColorHover)
	PlaceholderColor = lipgloss.Color(ColorMutedBlue)

	// Badge colors
	AgentBadge    = lipgloss.Color(ColorAgentBadge)
	TransferBadge = lipgloss.Color(ColorTransferBadge)
)

Tokyo Night-inspired Color Palette

View Source
var (
	BaseStyle = lipgloss.NewStyle().Foreground(TextPrimary)
	AppStyle  = BaseStyle.Padding(0, 1, 0, 1)
)

Base Styles

View Source
var (
	HighlightStyle = BaseStyle.Foreground(Accent)
	MutedStyle     = BaseStyle.Foreground(TextMuted)
	SubtleStyle    = BaseStyle.Foreground(TextSubtle)
	SecondaryStyle = BaseStyle.Foreground(TextSecondary)
	BoldStyle      = BaseStyle.Bold(true)
	ItalicStyle    = BaseStyle.Italic(true)
)

Text Styles

View Source
var (
	SuccessStyle    = BaseStyle.Foreground(Success)
	ErrorStyle      = BaseStyle.Foreground(Error)
	WarningStyle    = BaseStyle.Foreground(Warning)
	InfoStyle       = BaseStyle.Foreground(Info)
	ActiveStyle     = BaseStyle.Foreground(Success)
	InProgressStyle = BaseStyle.Foreground(Warning)
	PendingStyle    = BaseStyle.Foreground(TextSecondary)
)

Status Styles

View Source
var (
	BorderStyle = BaseStyle.
				Border(lipgloss.RoundedBorder()).
				BorderForeground(BorderPrimary)

	BorderedBoxStyle = BaseStyle.
						Border(lipgloss.RoundedBorder()).
						BorderForeground(BorderSecondary).
						Padding(0, 1)

	BorderedBoxFocusedStyle = BaseStyle.
							Border(lipgloss.RoundedBorder()).
							BorderForeground(BorderPrimary).
							Padding(0, 1)

	UserMessageBorderStyle = BaseStyle.
							Padding(1, 2).
							BorderLeft(true).
							BorderStyle(lipgloss.ThickBorder()).
							BorderForeground(BorderPrimary).
							Bold(true).
							Background(BackgroundAlt)

	WelcomeMessageBorderStyle = BaseStyle.
								Padding(1, 2).
								BorderLeft(true).
								BorderStyle(lipgloss.DoubleBorder()).
								Bold(true)

	ErrorMessageStyle = ErrorStyle.
						Padding(0, 2).
						BorderLeft(true).
						BorderStyle(lipgloss.ThickBorder())
)

Border Styles

View Source
var (
	DialogStyle = BaseStyle.
				Border(lipgloss.RoundedBorder()).
				BorderForeground(BorderSecondary).
				Foreground(TextPrimary).
				Padding(1, 2).
				Align(lipgloss.Left)

	DialogWarningStyle = BaseStyle.
						Border(lipgloss.RoundedBorder()).
						BorderForeground(BorderWarning).
						Foreground(TextPrimary).
						Padding(1, 2).
						Align(lipgloss.Left)

	DialogTitleStyle = BaseStyle.
						Bold(true).
						Foreground(TextSecondary).
						Align(lipgloss.Center)

	DialogTitleWarningStyle = BaseStyle.
							Bold(true).
							Foreground(Warning).
							Align(lipgloss.Center)

	DialogTitleInfoStyle = BaseStyle.
							Bold(true).
							Foreground(Info).
							Align(lipgloss.Center)

	DialogContentStyle = BaseStyle.
						Foreground(TextPrimary)

	DialogSeparatorStyle = BaseStyle.
							Foreground(BorderMuted)

	DialogLabelStyle = BaseStyle.
						Bold(true).
						Foreground(TextMuted)

	DialogValueStyle = BaseStyle.
						Bold(true).
						Foreground(TextSecondary)

	DialogQuestionStyle = BaseStyle.
						Bold(true).
						Foreground(TextPrimary).
						Align(lipgloss.Center)

	DialogOptionsStyle = BaseStyle.
						Foreground(TextMuted).
						Align(lipgloss.Center)

	DialogHelpStyle = BaseStyle.
					Foreground(TextMuted).
					Italic(true)
)

Dialog Styles

View Source
var (
	PaletteSelectedStyle = BaseStyle.
							Background(Selected).
							Foreground(SelectedFg).
							Padding(0, 1)

	PaletteUnselectedStyle = BaseStyle.
							Foreground(TextPrimary).
							Padding(0, 1)

	PaletteCategoryStyle = BaseStyle.
							Bold(true).
							Foreground(TextMuted).
							MarginTop(1)

	PaletteDescStyle = BaseStyle.
						Foreground(TextMuted)
)

Command Palette Styles

View Source
var (
	DiffAddStyle = BaseStyle.
					Background(DiffAddBg).
					Foreground(DiffAddFg)

	DiffRemoveStyle = BaseStyle.
					Background(DiffRemoveBg).
					Foreground(DiffRemoveFg)

	DiffUnchangedStyle = BaseStyle.Background(BackgroundAlt)

	DiffContextStyle = BaseStyle
)

Diff Styles (matching glamour markdown theme)

View Source
var (
	LineNumberStyle = BaseStyle.Foreground(LineNumber).Background(BackgroundAlt)
	SeparatorStyle  = BaseStyle.Foreground(Separator).Background(BackgroundAlt)
)

Syntax highlighting UI element styles

View Source
var (
	ToolCallArgs = BaseStyle.
					BorderLeft(true).
					BorderStyle(lipgloss.RoundedBorder()).
					BorderForeground(BorderSecondary)

	ToolCallArgKey = BaseStyle.Bold(true).Foreground(TextSecondary)

	ToolCallResult = BaseStyle.
					BorderLeft(true).
					BorderStyle(lipgloss.RoundedBorder()).
					BorderForeground(BorderSecondary)

	ToolCallResultKey = BaseStyle.Bold(true).Foreground(TextSecondary)
)

Tool Call Styles

View Source
var (
	InputStyle = textarea.Styles{
		Focused: textarea.StyleState{
			Base:        BaseStyle,
			Placeholder: BaseStyle.Foreground(PlaceholderColor),
		},
		Blurred: textarea.StyleState{
			Base:        BaseStyle,
			Placeholder: BaseStyle.Foreground(PlaceholderColor),
		},
		Cursor: textarea.CursorStyle{
			Color: Accent,
		},
	}
	EditorStyle = BaseStyle.Padding(2, 0, 0, 0)
	// SuggestionGhostStyle renders inline auto-complete hints in a muted tone.
	SuggestionGhostStyle = BaseStyle.Foreground(TextMuted)
)

Input Styles

View Source
var (
	TrackStyle = lipgloss.NewStyle().Foreground(BorderSecondary)
	ThumbStyle = lipgloss.NewStyle().Foreground(Accent)
)

Scrollbar

View Source
var (
	NotificationStyle = BaseStyle.
						Border(lipgloss.RoundedBorder()).
						BorderForeground(Success).
						Padding(0, 1)

	NotificationInfoStyle = BaseStyle.
							Border(lipgloss.RoundedBorder()).
							BorderForeground(Info).
							Padding(0, 1)

	NotificationWarningStyle = BaseStyle.
								Border(lipgloss.RoundedBorder()).
								BorderForeground(Warning).
								Padding(0, 1)

	NotificationErrorStyle = BaseStyle.
							Border(lipgloss.RoundedBorder()).
							BorderForeground(Error).
							Padding(0, 1)
)

Notification Styles

View Source
var (
	CompletionBoxStyle = BaseStyle.
						Border(lipgloss.RoundedBorder()).
						BorderForeground(BorderSecondary).
						Padding(0, 1)

	CompletionSelectedStyle = BaseStyle.
							Foreground(TextPrimary).
							Bold(true)

	CompletionNormalStyle = BaseStyle.
							Foreground(TextPrimary)

	CompletionDescStyle = BaseStyle.
						Foreground(TextSecondary).
						Italic(true)

	CompletionNoResultsStyle = BaseStyle.
								Foreground(TextMuted).
								Italic(true).
								Align(lipgloss.Center)
)

Completion Styles

View Source
var (
	AgentBadgeStyle = BaseStyle.
					Foreground(AgentBadge).
					Bold(true).
					Padding(0, 1)

	TransferBadgeStyle = BaseStyle.
						Foreground(TransferBadge).
						Bold(true).
						Padding(0, 1)
)

Agent and transfer badge styles

View Source
var (
	StatusStyle = MutedStyle
	ActionStyle = SecondaryStyle
	ChatStyle   = BaseStyle
)

Deprecated styles (kept for backward compatibility)

View Source
var (
	SpinnerCharStyle          = BaseStyle.Foreground(Accent)
	SpinnerTextBrightestStyle = BaseStyle.Foreground(lipgloss.Color(ColorSpinnerBrightest))
	SpinnerTextBrightStyle    = BaseStyle.Foreground(lipgloss.Color(ColorSpinnerBright))
	SpinnerTextDimStyle       = BaseStyle.Foreground(lipgloss.Color(ColorSpinnerDim))
	SpinnerTextDimmestStyle   = BaseStyle.Foreground(Accent)
)

Spinner Styles

View Source
var (
	CenterStyle = BaseStyle.Align(lipgloss.Center, lipgloss.Center)
)

Layout Styles

View Source
var (
	SelectionStyle = BaseStyle.
		Background(Selected).
		Foreground(SelectedFg)
)

Selection Styles

Functions

func ChromaStyle added in v1.9.2

func ChromaStyle() *chroma.Style

func MarkdownStyle added in v1.9.2

func MarkdownStyle() ansi.StyleConfig

Types

This section is empty.

Jump to

Keyboard shortcuts

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