styles

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alpha

func Alpha(c color.Color, alpha uint8) color.Color

Alpha returns a color with transparency

func ApplyBoldForegroundGrad

func ApplyBoldForegroundGrad(input string, color1, color2 color.Color) string

ApplyBoldForegroundGrad renders a given string with a horizontal gradient foreground.

func ApplyForegroundGrad

func ApplyForegroundGrad(input string, color1, color2 color.Color) string

ApplyForegroundGrad renders a given string with a horizontal gradient foreground.

func Darken

func Darken(c color.Color, percent float64) color.Color

Darken makes a color darker by percentage (0-100)

func ForegroundGrad

func ForegroundGrad(input string, bold bool, color1, color2 color.Color) []string

func Lighten

func Lighten(c color.Color, percent float64) color.Color

Lighten makes a color lighter by percentage (0-100)

func ParseHex

func ParseHex(hex string) color.Color

ParseHex converts hex string to color

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func SetDefaultManager

func SetDefaultManager() *Manager

func (*Manager) Current

func (m *Manager) Current() *Theme

func (*Manager) List

func (m *Manager) List() []string

func (*Manager) Register

func (m *Manager) Register(theme *Theme)

func (*Manager) SetTheme

func (m *Manager) SetTheme(name string) error

type Styles

type Styles struct {
	Base         lipgloss.Style
	SelectedBase lipgloss.Style

	Title        lipgloss.Style
	Subtitle     lipgloss.Style
	Text         lipgloss.Style
	TextSelected lipgloss.Style
	Muted        lipgloss.Style
	Subtle       lipgloss.Style

	Success lipgloss.Style
	Error   lipgloss.Style
	Warning lipgloss.Style
	Info    lipgloss.Style

	TextInput textinput.Styles

	Help help.Styles
}

type Theme

type Theme struct {
	ThemeName string
	IsDark    bool

	Primary   color.Color
	Secondary color.Color
	Tertiary  color.Color
	Accent    color.Color

	BgBase        color.Color
	BgBaseLighter color.Color
	BgSubtle      color.Color
	BgOverlay     color.Color

	FgBase      color.Color
	FgMuted     color.Color
	FgHalfMuted color.Color
	FgSubtle    color.Color
	FgSelected  color.Color

	Border      color.Color
	BorderFocus color.Color

	Success color.Color
	Error   color.Color
	Warning color.Color
	Info    color.Color

	White color.Color

	TextSelection lipgloss.Style
	// contains filtered or unexported fields
}

func CurrentTheme

func CurrentTheme() *Theme

func NewCharmtoneTheme

func NewCharmtoneTheme() *Theme

func (*Theme) S

func (t *Theme) S() *Styles

Jump to

Keyboard shortcuts

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