MCPcopy
hub / github.com/opentrace/opentrace / getNodeColor

Function getNodeColor

ui/src/components/colors/nodeColors.ts:105–108  ·  view source on GitHub ↗
(type: string)

Source from the content-addressed store, hash-verified

103}
104
105export function getNodeColor(type: string): string {
106 const { known, palette } = resolveColors();
107 return known.get(type) ?? palette[djb2(type) % palette.length];
108}

Callers 15

GetNodeResultFunction · 0.90
NodeListResultFunction · 0.90
TraverseResultFunction · 0.90
TreeRowFunction · 0.90
GraphPlaygroundFunction · 0.90
StreamingGraphPlaygroundFunction · 0.90
SidePanelFunction · 0.90
useGraphViewerFunction · 0.90
useGraphVisualsFunction · 0.85
useGraphInstanceFunction · 0.85
nodeColors.test.tsFile · 0.85

Calls 3

resolveColorsFunction · 0.70
djb2Function · 0.70
getMethod · 0.65

Tested by

no test coverage detected