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

Function getPriorityColor

apps/cli/internal/cli/colors.go:64–75  ·  view source on GitHub ↗

getPriorityColor returns the appropriate color style for a priority level.

(priority string, r *lipgloss.Renderer)

Source from the content-addressed store, hash-verified

62
63// getPriorityColor returns the appropriate color style for a priority level.
64func getPriorityColor(priority string, r *lipgloss.Renderer) lipgloss.Style {
65 switch strings.ToLower(priority) {
66 case "critical":
67 return r.NewStyle().Foreground(lipgloss.Color("1")) // Red
68 case "high":
69 return r.NewStyle().Foreground(lipgloss.Color("3")) // Yellow
70 case "medium":
71 return r.NewStyle().Foreground(lipgloss.Color("4")) // Blue
72 default: // low or other
73 return r.NewStyle().Foreground(lipgloss.Color("8")) // Gray
74 }
75}
76
77// getEffortColor returns the appropriate color style for an effort level.
78func getEffortColor(effort string, r *lipgloss.Renderer) lipgloss.Style {

Callers 2

formatHeadingFunction · 0.85
formatPriorityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected