MCPcopy Index your code
hub / github.com/callstack/agent-device / formatScreenshotDiffPixelCountLines

Function formatScreenshotDiffPixelCountLines

src/utils/output.ts:381–389  ·  view source on GitHub ↗
(
  data: ScreenshotDiffResult,
  useColor: boolean,
)

Source from the content-addressed store, hash-verified

379}
380
381function formatScreenshotDiffPixelCountLines(
382 data: ScreenshotDiffResult,
383 useColor: boolean,
384): string[] {
385 const differentPixels = toNumber(data.differentPixels);
386 const totalPixels = toNumber(data.totalPixels);
387 const diffCount = useColor ? colorize(String(differentPixels), 'red') : String(differentPixels);
388 return [` ${diffCount} different / ${totalPixels} total pixels`];
389}
390
391function formatScreenshotDiffHintLines(data: ScreenshotDiffResult, useColor: boolean): string[] {
392 const hints = formatScreenshotDiffHints(data);

Callers 1

formatScreenshotDiffTextFunction · 0.85

Calls 2

toNumberFunction · 0.85
colorizeFunction · 0.85

Tested by

no test coverage detected