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

Function parse

graph-ui/tools/smoke-w9.mjs:458–462  ·  view source on GitHub ↗
(hex)

Source from the content-addressed store, hash-verified

456/** Der Abstand zweier Farben, so wie der Lauf ihn rechnet. */
457function colorDistance(first, second) {
458 const parse = (hex) => [
459 parseInt(hex.slice(1, 3), 16),
460 parseInt(hex.slice(3, 5), 16),
461 parseInt(hex.slice(5, 7), 16),
462 ];
463 const normalise = (rgb) => {
464 const top = Math.max(...rgb);
465 return top <= 0 ? [0, 0, 0] : rgb.map((value) => (value * 255) / top);

Callers 1

colorDistanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected