Documentation
¶
Overview ¶
Package theme provides Glean's brand colors and theme utilities for consistent CLI styling. Colors sourced directly from www.glean.com (#343CED confirmed as dominant primary, 60 occurrences).
Index ¶
Constants ¶
View Source
const ( GleanBlueHex = "#343CED" // Primary brand blue/indigo (was incorrectly #4339F2) GleanGreenHex = "#D8FD49" // Yellow-green accent GleanPurpleHex = "#E16BFF" // Purple accent GleanOrangeHex = "#FF7E4C" // Orange accent GleanErrorHex = "#FF492C" // Coral red (error / destructive) GleanMutedHex = "#777867" // Warm gray (muted text, on-brand) GleanCreamHex = "#E1DFD7" // Warm off-white (surface) // Legacy aliases kept for backward compatibility. GleanYellowHex = GleanGreenHex )
Glean brand palette — sourced from www.glean.com.
Variables ¶
View Source
var ( // Blue applies Glean's primary brand color (#343CED). Blue = Color{color.New(color.FgHiBlue), GleanBlueHex}.SprintFunc() // Muted applies Glean's warm gray for secondary / dimmed text. Muted = Color{color.New(color.FgHiBlack), GleanMutedHex}.SprintFunc() // Bold makes text bold. Bold = color.New(color.Bold).SprintFunc() // Success applies a bright accent for positive outcomes. Success = Color{color.New(color.FgHiGreen), GleanGreenHex}.SprintFunc() // Err applies Glean's coral red for errors. Err = Color{color.New(color.FgHiRed), GleanErrorHex}.SprintFunc() // Secondary is an alias for Muted (backward compat). Secondary = Muted // Yellow is kept for backward compat (maps to green accent now). Yellow = Color{color.New(color.FgHiYellow), GleanGreenHex}.SprintFunc() )
Branded color functions for consistent CLI stdout output.
Functions ¶
func TemplateFuncs ¶
TemplateFuncs returns template helpers that respect color settings.
Types ¶
type Color ¶
Color wraps fatih/color with the hex value for lipgloss compatibility.
func (Color) SprintFunc ¶
SprintFunc returns a function that colorizes text.
func (Color) ToLipgloss ¶
ToLipgloss returns the equivalent lipgloss.Color.
Click to show internal directories.
Click to hide internal directories.