Documentation
¶
Index ¶
Constants ¶
const DefaultName = "kong"
DefaultName is the built-in theme used when no override is provided.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() []string
Available returns the list of registered theme IDs (sorted).
func AvailableDisplayNames ¶
AvailableDisplayNames returns a map of theme IDs to display names.
func ContextWithPalette ¶
ContextWithPalette stores the palette on the context.
Types ¶
type Color ¶
Color stores light and dark variants for adaptive rendering.
func (Color) Adaptive ¶
func (c Color) Adaptive() lipgloss.AdaptiveColor
Adaptive converts the color into a lipgloss adaptive color.
type Flag ¶
type Flag struct {
// contains filtered or unexported fields
}
Flag is a pflag.Value implementation for theme IDs.
type Palette ¶
Palette represents a concrete theme.
func FromContext ¶
FromContext returns the palette stored on the context or the current palette.
func (Palette) Adaptive ¶
func (p Palette) Adaptive(token Token) lipgloss.AdaptiveColor
Adaptive returns the lipgloss adaptive color for the provided token.
func (Palette) BackgroundStyle ¶
BackgroundStyle returns a lipgloss style with the background set to the requested token.
type Token ¶
type Token string
Token represents a semantic color slot within the CLI.
const ( ColorTextPrimary Token = "text.primary" ColorTextSecondary Token = "text.secondary" ColorTextMuted Token = "text.muted" ColorBorder Token = "border" ColorSurface Token = "surface" ColorSurfaceText Token = "surface.text" ColorPrimary Token = "primary" ColorPrimaryText Token = "primary.text" ColorAccent Token = "accent" ColorAccentText Token = "accent.text" ColorSuccess Token = "success" ColorSuccessText Token = "success.text" ColorInfo Token = "info" ColorInfoText Token = "info.text" ColorWarning Token = "warning" ColorWarningText Token = "warning.text" ColorDanger Token = "danger" ColorDangerText Token = "danger.text" ColorHighlight Token = "highlight" )