Skip to main content

Interface: CompareImageResult

Defined in: packages/uimatch-core/src/core/compare.ts:210

Result of image comparison.

Properties

colorDeltaEAvg?

optional colorDeltaEAvg: number;

Defined in: packages/uimatch-core/src/core/compare.ts:263

Average color delta E (if style differences were calculated).


contentCoverage?

optional contentCoverage: number;

Defined in: packages/uimatch-core/src/core/compare.ts:228

Content coverage ratio (content area / total canvas). Shows what percentage of the canvas is actual content vs. padding/background.


contentPixels?

optional contentPixels: number;

Defined in: packages/uimatch-core/src/core/compare.ts:248

Total content pixels (union of figma and impl content areas).


diffPixelCount

diffPixelCount: number;

Defined in: packages/uimatch-core/src/core/compare.ts:233

Absolute count of different pixels.


diffPngB64

diffPngB64: string;

Defined in: packages/uimatch-core/src/core/compare.ts:238

Visual diff image as base64 PNG.


dimensions

dimensions: DimensionInfo;

Defined in: packages/uimatch-core/src/core/compare.ts:253

Dimension information (original and compared sizes).


pixelDiffRatio

pixelDiffRatio: number;

Defined in: packages/uimatch-core/src/core/compare.ts:215

Global pixel difference ratio (0 to 1). This is calculated using the entire canvas including padding/background.


pixelDiffRatioContent?

optional pixelDiffRatioContent: number;

Defined in: packages/uimatch-core/src/core/compare.ts:222

Content-only pixel difference ratio (diff pixels / content area). This normalizes against actual content area instead of entire canvas, giving a more intuitive measure that matches visual perception.


styleDiffs?

optional styleDiffs: StyleDiff[];

Defined in: packages/uimatch-core/src/core/compare.ts:258

Style differences (if styles were provided).


totalPixels

totalPixels: number;

Defined in: packages/uimatch-core/src/core/compare.ts:243

Total pixel count (width × height).