MCPcopy Create free account
hub / github.com/Rello/analytics / colored

Function colored

tests/playwright/chart_export.js:107–107  ·  view source on GitHub ↗
(pixels, index)

Source from the content-addressed store, hash-verified

105 // Compare colored plot coverage, tolerating SVG/Canvas edge antialiasing.
106 let union = 0, intersection = 0;
107 const colored = (pixels, index) => pixels[index + 3] > 30 && Math.max(...pixels.slice(index, index + 3)) - Math.min(...pixels.slice(index, index + 3)) > 40;
108 for (let i = 0; i < actual.length; i += 4) {
109 const a = colored(actual, i), b = colored(expected, i);
110 if (a || b) union++;

Callers 1

chart_export.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected