import type { ParsedCss } from "./css.js"; /** * DOCXs are a light document canvas (white page, dark text). Computed styles from a * browser tab in dark mode often yield near-white `color` with a transparent fill — * invisible in Word. These helpers detect that case so we can drop the light * foreground and fall back to the document default. */ /** Relative luminance of a 6-char RRGGBB hex (sRGB), 0 = black, 1 = white. */ export declare function relativeLuminance(hex: string): number; /** Whether a parsed 6-char RRGGBB background is dark enough to host light text. */ export declare function isDarkBackgroundColor(hex: string | undefined): boolean; export interface DocumentCanvasRemapOptions { /** True when any ancestor element paints a dark block background (e.g. `.hero`). */ ancestorHasDarkBackground?: boolean; } /** * Drop near-white text colors when there is no dark block background — Word's page * is white, so those colors would vanish. Light text on a dark shaded block (self or * ancestor) is kept. */ export declare function remapComputedColorsForDocumentCanvas(css: ParsedCss, options?: DocumentCanvasRemapOptions): ParsedCss; //# sourceMappingURL=document-canvas.d.ts.map