MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / nodeGlowBoost

Function nodeGlowBoost

graph-ui/src/galaxy/density.ts:102–109  ·  view source on GitHub ↗
(r: number, g: number, b: number)

Source from the content-addressed store, hash-verified

100const GLOW_RED_GAIN = 0.9;
101
102export function nodeGlowBoost(r: number, g: number, b: number): number {
103 /* Blue that exceeds both red and green is a cool hub. Red that exceeds both
104 * green and blue is a warm leaf (the green cutoff keeps yellow/orange out
105 * of the red term so they are not boosted). */
106 const blueness = Math.max(0, b - Math.max(r, g));
107 const redness = Math.max(0, r - Math.max(g, b));
108 return GLOW_BASE + blueness * GLOW_BLUE_GAIN + redness * GLOW_RED_GAIN;
109}
110
111/* User-facing multipliers layered ON TOP of the adaptive scales above: the
112 * adaptive scale picks a sane default for the current density, the settings

Callers 1

nodeColorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected