Documentation
¶
Index ¶
- Constants
- func Danger() lipgloss.Color
- func DangerMod(mod int) lipgloss.Color
- func Default() lipgloss.Color
- func DefaultMod(mod int) lipgloss.Color
- func EnsureThemeFile() error
- func HuhTheme() *huh.Theme
- func LoadAndSetCurrentTheme() error
- func Primary() lipgloss.Color
- func PrimaryMod(mod int) lipgloss.Color
- func Secondary() lipgloss.Color
- func SecondaryMod(mod int) lipgloss.Color
- func SetCurrentTheme(t Theme)
- func Success() lipgloss.Color
- func SuccessMod(mod int) lipgloss.Color
- func ThemePath() string
- func Warning() lipgloss.Color
- func WarningMod(mod int) lipgloss.Color
- type Palette
- type Theme
Constants ¶
View Source
const DefaultThemeYAML = `` /* 1443-byte string literal not displayed */
DefaultThemeYAML is the initial theme created at <client app dir>/theme.yaml.
Palettes: - default: neutral base - primary/secondary: accent colors - success/warning/danger: semantic colors
Each palette has a "default" value and a set of numeric modifiers: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900.
View Source
const (
ThemeFileName = "theme.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultMod ¶
func EnsureThemeFile ¶
func EnsureThemeFile() error
func HuhTheme ¶
HuhTheme returns a huh Theme derived from the current Sliver client theme.
This is used for all interactive TUI forms in the client so that colors are consistent with the rest of the console styling (theme.yaml).
func LoadAndSetCurrentTheme ¶
func LoadAndSetCurrentTheme() error
func PrimaryMod ¶
func SecondaryMod ¶
func SetCurrentTheme ¶
func SetCurrentTheme(t Theme)
func SuccessMod ¶
func WarningMod ¶
Types ¶
type Theme ¶
type Theme struct {
Primary Palette `yaml:"primary"`
Secondary Palette `yaml:"secondary"`
Default Palette `yaml:"default"`
Success Palette `yaml:"success"`
Warning Palette `yaml:"warning"`
Danger Palette `yaml:"danger"`
}
func Current ¶
func Current() Theme
Current returns the in-memory current theme (defaults to DefaultThemeYAML).
func LoadThemeFromDisk ¶
Click to show internal directories.
Click to hide internal directories.