MCPcopy Create free account
hub / github.com/driangle/taskmd / getStatusColor

Function getStatusColor

apps/cli/internal/cli/colors.go:48–61  ·  view source on GitHub ↗

getStatusColor returns the appropriate color style for a task status.

(status string, r *lipgloss.Renderer)

Source from the content-addressed store, hash-verified

46
47// getStatusColor returns the appropriate color style for a task status.
48func getStatusColor(status string, r *lipgloss.Renderer) lipgloss.Style {
49 switch strings.ToLower(status) {
50 case "completed":
51 return r.NewStyle().Foreground(lipgloss.Color("2")) // Green
52 case "in-progress":
53 return r.NewStyle().Foreground(lipgloss.Color("3")) // Yellow
54 case "in-review":
55 return r.NewStyle().Foreground(lipgloss.Color("5")) // Magenta
56 case "blocked":
57 return r.NewStyle().Foreground(lipgloss.Color("1")) // Red
58 default: // pending or other
59 return r.NewStyle().Foreground(lipgloss.Color("8")) // Gray
60 }
61}
62
63// getPriorityColor returns the appropriate color style for a priority level.
64func getPriorityColor(priority string, r *lipgloss.Renderer) lipgloss.Style {

Callers 4

formatTaskTitleFunction · 0.85
formatHeadingFunction · 0.85
formatStatusFunction · 0.85
runGraphFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected