MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / getColor

Function getColor

src/components/ActivityHeatmap.tsx:20–27  ·  view source on GitHub ↗
(count: number, max: number)

Source from the content-addressed store, hash-verified

18}
19
20function getColor(count: number, max: number): string {
21 if (count === 0) return "rgba(255,255,255,0.04)";
22 const ratio = count / Math.max(max, 1);
23 if (ratio < 0.25) return "rgba(255, 59, 48, 0.2)";
24 if (ratio < 0.5) return "rgba(255, 59, 48, 0.4)";
25 if (ratio < 0.75) return "rgba(255, 59, 48, 0.65)";
26 return "rgba(255, 59, 48, 0.9)";
27}
28
29export function ActivityHeatmap() {
30 const [stats, setStats] = useState<HeatmapStats | null>(null);

Callers 1

ActivityHeatmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected