MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getStatusColor

Function getStatusColor

packages/cli/src/ui/utils/displayUtils.ts:21–33  ·  view source on GitHub ↗
(
  value: number,
  thresholds: { green: number; yellow: number },
  options: { defaultColor?: string } = {},
)

Source from the content-addressed store, hash-verified

19
20// --- Color Logic ---
21export const getStatusColor = (
22 value: number,
23 thresholds: { green: number; yellow: number },
24 options: { defaultColor?: string } = {},
25) => {
26 if (value >= thresholds.green) {
27 return Colors.AccentGreen;
28 }
29 if (value >= thresholds.yellow) {
30 return Colors.AccentYellow;
31 }
32 return options.defaultColor || Colors.AccentRed;
33};

Callers 4

StatsDisplayFunction · 0.85
StatRowFunction · 0.85
ToolStatsDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected