OOXML Structure
Use case
- Status indicators - Red for errors, green for success, yellow for warnings
- Document sections - Color-code different types of content
- Emphasis - Draw attention without changing font size or weight
- Brand consistency - Match company colors in documents
- Legal markup - Highlight changes, additions, deletions
Best practices
- Accessibility - Ensure sufficient contrast ratios (WCAG 2.1 AA: 4.5:1)
- Print-friendly - Test colors in both digital and printed formats
- Consistency - Use the same color for the same meaning throughout
- Restraint - Too many colors reduce effectiveness
- Fallbacks - Don’t rely solely on color to convey meaning
Options
Configure the extension behavior:Array<string>
default:"['textStyle']"
Mark types to add color support to
Attributes
Node attributes that can be set and retrieved:ColorValue
Text color value
Commands
setColor
Set text color
Preserves other text styling attributes
ColorValue
required
Color value to apply
unsetColor
Remove text color
Removes color while preserving other text styles

