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("#060809") Surface = lipgloss.Color("#0C1416") SurfaceAlt = lipgloss.Color("#121C1F") Border = lipgloss.Color("#2D4F54") Primary = lipgloss.Color("#F5D27E") PrimaryDim = lipgloss.Color("#C4A056") Accent = lipgloss.Color("#7FE7DE") Unread = lipgloss.Color("#5BA8A8") Warning = lipgloss.Color("#F2C94C") Danger = lipgloss.Color("#A85C32") Fg = lipgloss.Color("#F3EED4") FgDim = lipgloss.Color("#9AA8A4") Muted = lipgloss.Color("#5C6E6C") )
Palette. Near-black ground with cream type, gold as the primary, and a teal accent — the same colors as postline.dev, so the program and the site are one object.
const ( GradientStart = "#F5D27E" GradientEnd = "#7FE7DE" )
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.