/** * Color compositing utilities for raster tiles. * * Implements physically correct alpha blending using linear color space * and Porter-Duff "source-over" compositing. This produces visually * accurate results when overlaying semi-transparent colors. * * @module */ import type { Rgba } from "@osmix/shared/types"; /** * Composite an ordered list of RGBA pixels using premultiplied alpha. * * Pipeline per pixel: * 1) Convert sRGB (0..255) to linear light (0..1). * 2) Premultiply color by alpha. * 3) Fold left with Porter–Duff “over” starting from transparent. * 4) Unpremultiply and convert back to RGBA (0..255). * * Returns an RGBA tuple. * Notes: * - Drawing the same semi‑transparent color repeatedly increases coverage: * α_n = 1 - (1 - α)^n * - Order matters when colors differ (standard source‑over compositing). */ export declare function compositeRGBA(pixels: Rgba[]): Rgba; //# sourceMappingURL=color.d.ts.map