Documentation
¶
Overview ¶
Package theme provides theming support for the Skills CLI UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDarkBackground ¶ added in v2.3.5
func IsDarkBackground() bool
IsDarkBackground reports whether the terminal has a dark background. Defaults to dark when detection is not possible (non-TTY).
func Profile ¶ added in v2.3.5
func Profile() colorprofile.Profile
Profile returns the detected terminal color profile.
Types ¶
type AdaptiveColor ¶ added in v2.3.5
AdaptiveColor defines a color with variants for light and dark terminal backgrounds. Lipgloss v2 dropped its own AdaptiveColor, so resolution against the detected background happens here.
func (AdaptiveColor) Color ¶ added in v2.3.5
func (c AdaptiveColor) Color() color.Color
Color resolves the variant matching the detected terminal background, downsampled to the terminal's color profile.
type ColorPalette ¶
type ColorPalette struct {
// Primary accent color (e.g., cyan for Claude Code)
Primary AdaptiveColor
// Secondary accent color (e.g., blue)
Secondary AdaptiveColor
// Status colors
Success AdaptiveColor
Error AdaptiveColor
Warning AdaptiveColor
Info AdaptiveColor
// Text colors
Text AdaptiveColor
TextMuted AdaptiveColor
TextFaint AdaptiveColor
TextEmphasis AdaptiveColor
// UI element colors
Border AdaptiveColor
Highlight AdaptiveColor
}
ColorPalette defines the colors used by a theme.
type Styles ¶
type Styles struct {
// Message styles
Success lipgloss.Style
Error lipgloss.Style
Warning lipgloss.Style
Info lipgloss.Style
// Layout styles
Header lipgloss.Style
SubHeader lipgloss.Style
// Text styles
Bold lipgloss.Style
Muted lipgloss.Style
Faint lipgloss.Style
Emphasis lipgloss.Style
// List styles
ListItem lipgloss.Style
ListBullet lipgloss.Style
Selected lipgloss.Style
Cursor lipgloss.Style
// Key-Value styles
Key lipgloss.Style
Value lipgloss.Style
Separator lipgloss.Style
// Progress/status styles
Spinner lipgloss.Style
Progress lipgloss.Style
}
Styles contains pre-composed lipgloss styles.
type Symbols ¶
type Symbols struct {
Success string
Error string
Warning string
Info string
Arrow string
Bullet string
Pending string
InProgress string
}
Symbols defines the glyphs used for various states.
type Theme ¶
type Theme interface {
// Name returns the theme identifier
Name() string
// Palette returns the color palette
Palette() ColorPalette
// Styles returns pre-composed lipgloss styles
Styles() Styles
// Symbols returns the glyphs used for various states
Symbols() Symbols
}
Theme defines the visual styling for the CLI.
func NewClaudeCodeTheme ¶
func NewClaudeCodeTheme() Theme
NewClaudeCodeTheme creates a new Claude Code theme instance.