41 lines
1.4 KiB
Go
41 lines
1.4 KiB
Go
// Package theme is the Catppuccin palette used by lazyntfy.
|
|||
|
|
// Dark terminals get Mocha and light terminals get Latte, so the chrome
|
||
|
|
// matches a Catppuccin terminal theme.
|
||
|
|
package theme
|
||
|
|
|
||
|
|
import (
|
||
|
|
"image/color"
|
||
|
|
|
||
|
|
"charm.land/lipgloss/v2"
|
||
|
|
"charm.land/lipgloss/v2/compat"
|
||
|
|
)
|
||
|
|
|
||
|
|
func pair(dark, light string) color.Color {
|
||
|
|
return compat.AdaptiveColor{Dark: lipgloss.Color(dark), Light: lipgloss.Color(light)}
|
||
|
|
}
|
||
|
|
|
||
|
|
var (
|
||
|
|
// Mocha / Latte.
|
||
|
|
mauve = pair("#cba6f7", "#8839ef")
|
||
|
|
red = pair("#f38ba8", "#d20f39")
|
||
|
|
yellow = pair("#f9e2af", "#df8e1d")
|
||
|
|
green = pair("#a6e3a1", "#40a02b")
|
||
|
|
text = pair("#cdd6f4", "#4c4f69")
|
||
|
|
overlay = pair("#6c7086", "#9ca0b0")
|
||
|
|
surface = pair("#313244", "#ccd0da")
|
||
|
|
base = pair("#1e1e2e", "#eff1f5")
|
||
|
|
crust = pair("#11111b", "#dce0e8")
|
||
|
|
|
||
|
|
Title = lipgloss.NewStyle().Bold(true).Foreground(mauve)
|
||
|
|
Accent = lipgloss.NewStyle().Foreground(mauve)
|
||
|
|
Text = lipgloss.NewStyle().Foreground(text)
|
||
|
|
Dim = lipgloss.NewStyle().Foreground(overlay)
|
||
|
|
OK = lipgloss.NewStyle().Foreground(green)
|
||
|
|
Warn = lipgloss.NewStyle().Foreground(yellow)
|
||
|
|
Bad = lipgloss.NewStyle().Bold(true).Foreground(red)
|
||
|
|
Badge = lipgloss.NewStyle().Bold(true).Foreground(crust).Background(mauve)
|
||
|
|
Key = lipgloss.NewStyle().Bold(true).Foreground(mauve).Background(surface)
|
||
|
|
Filter = lipgloss.NewStyle().Foreground(crust).Background(yellow)
|
||
|
|
Selected = lipgloss.NewStyle().Bold(true).Foreground(base).Background(mauve)
|
||
|
|
)
|