MCPcopy
hub / github.com/opentrace/opentrace / getLinkColor

Function getLinkColor

ui/src/components/colors/linkColors.ts:111–115  ·  view source on GitHub ↗
(type: string)

Source from the content-addressed store, hash-verified

109}
110
111export function getLinkColor(type: string): string {
112 const upper = type.toUpperCase();
113 const { known, palette } = resolveColors();
114 return known.get(upper) ?? palette[djb2(upper) % palette.length];
115}

Callers 9

GraphPlaygroundFunction · 0.90
StreamingGraphPlaygroundFunction · 0.90
SidePanelFunction · 0.90
useGraphViewerFunction · 0.90
useGraphVisualsFunction · 0.85
useGraphInstanceFunction · 0.85
linkColors.test.tsFile · 0.85
EdgeDetailsPanelFunction · 0.85
NodeDetailsPanelFunction · 0.85

Calls 3

resolveColorsFunction · 0.70
djb2Function · 0.70
getMethod · 0.65

Tested by

no test coverage detected