/** * OOXML Theme Color Resolution — shared between Excel and Word modules. * * Provides utilities for resolving theme color references with tint/shade * transformations per the ECMA-376 color model. */ /** Standard OOXML theme color names (scheme keys in theme1.xml). */ export type OoxmlThemeColorName = "dk1" | "lt1" | "dk2" | "lt2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "hlink" | "folHlink"; /** * Map from OOXML property attribute values to theme scheme keys. * * Word/Excel run/paragraph/cell properties use long-form names ("dark1", * "light1", "hyperlink") while the theme XML stores short-form keys * ("dk1", "lt1", "hlink"). This map normalises both forms. */ export declare const THEME_COLOR_ATTRIBUTE_MAP: Record; /** * Apply a tint (lighten toward white) to a hex color. * * OOXML tint formula: `newComponent = component + (255 - component) * tint` * where tint ∈ [0, 1]. tint=0 → original, tint=1 → white. * * @param hex - 6-character hex color string (no "#" prefix). * @param tint - Tint value in range [0, 1]. * @returns Tinted 6-character hex color string. */ export declare function applyTint(hex: string, tint: number): string; /** * Apply a shade (darken toward black) to a hex color. * * OOXML shade formula: `newComponent = component * shade` * where shade ∈ [0, 1]. shade=1 → original, shade=0 → black. * * @param hex - 6-character hex color string (no "#" prefix). * @param shade - Shade value in range [0, 1]. * @returns Shaded 6-character hex color string. */ export declare function applyShade(hex: string, shade: number): string; /** * Resolve a theme color reference to a hex color string. * * Looks up the theme color by attribute name (normalising long-form names * like "dark1" to scheme keys like "dk1"), then applies optional tint or * shade transformation. * * @param themeColorName - The theme color attribute value (e.g. "accent1", "dark1", "dk1"). * @param colors - The theme color scheme (scheme key → 6-char hex mapping). * @param tint - Optional tint value in [0, 1]. Values > 1 are treated as * raw bytes (0-255) and normalised by dividing by 255. * @param shade - Optional shade value in [0, 1]. Values > 1 are treated as * raw bytes (0-255) and normalised by dividing by 255. * @returns Resolved 6-character hex color string, or undefined if the theme * color name cannot be found in the provided scheme. */ export declare function resolveOoxmlThemeColor(themeColorName: string, colors: Readonly>, tint?: number, shade?: number): string | undefined;