MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / scoreColor

Function scoreColor

src/components/SentimentPanel.tsx:8–14  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

6import { useI18n } from "@/i18n";
7
8function scoreColor(v: number): string {
9 if (v < 20) return "#ef4444";
10 if (v < 40) return "#f97316";
11 if (v < 60) return "#eab308";
12 if (v < 80) return "#22c55e";
13 return "#10b981";
14}
15
16function Gauge({ score }: { score: number }) {
17 const cx = 70;

Callers 3

GaugeFunction · 0.85
SubScoreBarFunction · 0.85
SentimentPanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected