Documentation
¶
Overview ¶
Package theme holds Postline's color palette and shared Lip Gloss styles. Lip Gloss degrades 24-bit color to 256- or 16-color automatically, so these values stay legible on limited terminals without any branching here.
Index ¶
Constants ¶
const ( Bg = lipgloss.Color("#0B0E14") Surface = lipgloss.Color("#151A23") SurfaceAlt = lipgloss.Color("#1D242F") Border = lipgloss.Color("#2A3341") Primary = lipgloss.Color("#8B7CFF") PrimaryDim = lipgloss.Color("#5B4FBF") Accent = lipgloss.Color("#3DDC97") Unread = lipgloss.Color("#5CCFE6") Warning = lipgloss.Color("#FFB454") Danger = lipgloss.Color("#FF5C7C") Fg = lipgloss.Color("#CBCCC6") FgDim = lipgloss.Color("#8A9199") Muted = lipgloss.Color("#5C6773") )
Palette. Deep charcoal ground with a violet primary and mint accent, chosen to stay readable against both dark and near-black terminal backgrounds.
const ( GradientStart = "#8B7CFF" GradientEnd = "#3DDC97" )
Banner gradient endpoints.
const BannerWidth = 63
BannerWidth is the column width the full banner needs.
Variables ¶
var ( App = lipgloss.NewStyle().Foreground(Fg) Title = lipgloss.NewStyle().Foreground(Primary).Bold(true) Subtle = lipgloss.NewStyle().Foreground(Muted) Dim = lipgloss.NewStyle().Foreground(FgDim) Pane = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(Border) PaneFocused = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(Primary) StatusBar = lipgloss.NewStyle(). Background(Surface). Foreground(FgDim) StatusKey = lipgloss.NewStyle(). Background(SurfaceAlt). Foreground(Primary). Bold(true). Padding(0, 1) ErrorText = lipgloss.NewStyle().Foreground(Danger).Bold(true) SuccessText = lipgloss.NewStyle().Foreground(Accent).Bold(true) WarnText = lipgloss.NewStyle().Foreground(Warning) UnreadDot = lipgloss.NewStyle().Foreground(Unread).Bold(true) StarGlyph = lipgloss.NewStyle().Foreground(Warning) )
Shared styles.
Functions ¶
func Banner ¶
func Banner() string
Banner renders the full ASCII logo with a horizontal color gradient.
func CompactBanner ¶
func CompactBanner() string
CompactBanner is the fallback for terminals too narrow for the block logo.
func GradientLine ¶
GradientLine colors each character of a line by interpolating between two hex colors in Lab space, which keeps the ramp perceptually even rather than bunching up in the middle the way naive RGB interpolation does.
Types ¶
This section is empty.