1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package main

import "github.com/charmbracelet/lipgloss"

// Color role constants define all colors used in the UI with semantic role names.
const (
	// Status indicators
	ColorUncommittedChanges lipgloss.Color = "14" // Bright cyan - Uncommitted local changes marker
	ColorError              lipgloss.Color = "9"  // Bright red - Error states
	ColorRestartable        lipgloss.Color = "3"  // Yellow/orange - Entries that can be restarted (<15min ago)

	// UI chrome and borders
	ColorTextDim          lipgloss.Color = "8" // Dark gray - Line numbers, help text, instructions
	ColorTextSecondary    lipgloss.Color = "8" // Dark gray - Spinners, loading placeholders
	ColorTableBorder      lipgloss.Color = "8" // Dark gray - Main table border
	ColorDetailBorder     lipgloss.Color = "5" // Magenta - Detail/help view border
	ColorErrorModalBorder lipgloss.Color = "1" // Red - Error modal border

	// Modal dialogs
	ColorDialogBackground lipgloss.Color = "0"  // Black - Modal/dialog backgrounds
	ColorDialogForeground lipgloss.Color = "15" // White - Modal/dialog text
	ColorInvoiceBorder    lipgloss.Color = "12" // Bright blue - Invoice dialog border

	// Interactive elements
	ColorCursorBackground lipgloss.Color = "15" // White - Text cursor/caret background
	ColorCursorForeground lipgloss.Color = "0"  // Black - Text cursor/caret foreground

	// Text elements
	ColorTitleText         lipgloss.Color = "15" // White - Section titles and headers
	ColorOverlayBackground lipgloss.Color = "0"  // Black - Overlay whitespace background
)

// Adaptive colors that change based on terminal background
var (
	// Selected row background - light gray for light mode, medium-dark gray for dark mode
	ColorSelectionBackground = lipgloss.AdaptiveColor{Light: "254", Dark: "237"}
)

const (
	// Text hierarchy
	ColorWarningText lipgloss.Color = "11" // Bright yellow - Warnings and file change indicators

	// Age gradient (newest to oldest)
	ColorAgeNewest lipgloss.Color = "10" // Bright green - Most recent commits
	ColorAgeNewer  lipgloss.Color = "2"  // Green
	ColorAgeMid    lipgloss.Color = "11" // Bright yellow
	ColorAgeOlder  lipgloss.Color = "3"  // Yellow
	ColorAgeOldest lipgloss.Color = "8"  // Gray - Oldest commits

	// Performance indicators (debug mode)
	ColorPerfGood    lipgloss.Color = "2" // Green
	ColorPerfWarning lipgloss.Color = "3" // Yellow
	ColorPerfBad     lipgloss.Color = "1" // Red
)

// Commit hash colors (excluding black and red for visibility)
var commitHashColors = []lipgloss.Color{
	"2", // Green
	"3", // Yellow
	"4", // Blue
	"5", // Magenta
	"6", // Cyan
	"7", // White
}

// Age gradient colors as slice for easy iteration
var ageGradientColors = []lipgloss.Color{
	ColorAgeNewest, // Bright green (newest)
	ColorAgeNewer,  // Green
	ColorAgeMid,    // Bright yellow
	ColorAgeOlder,  // Yellow
	ColorAgeOldest, // Gray (oldest)
}