New

docx-editor 1.x has shipped. Vue support, i18n, agents. Read the migration guide →

API Referencev1.0.2

@eigenpal/docx-editor-core/utils/highlightColors

OOXML highlight color name - hex mapping. Used by both adapter toolbars when serialising highlight selections to the `w:highlight` attribute (which only accepts named colors).

Lifted from packages/react/src/components/toolbarUtils.ts so both sides share the same canonical table.

Functions(1)

declare function mapHexToHighlightName(hex: string): string | null;

Variables(1)

OOXML highlight color name - hex mapping. Used by both adapter toolbars when serialising highlight selections to the `w:highlight` attribute (which only accepts named colors).

Lifted from packages/react/src/components/toolbarUtils.ts so both sides share the same canonical table.

HIGHLIGHT_HEX_TO_NAME: Record<string, string>