a:sysClr (System Color)
References a Windows system color for accessibility and OS-level color consistency.
Parent elements
Description
a:sysClr is the DrawingML system color element that references operating system-defined colors. It is defined in ECMA-376 Part 1 §20.1.2.3.31.
System colors provide:
- Accessibility through OS color settings
- Consistency with Windows visual design
- High contrast mode support
- User preference respect for visual accessibility
Common system colors:
- windowText, window: Text and background colors
- highlight, highlightText: Selection colors
- face3d, shadow, scrollBar: UI element colors
- activeBorder, inactiveBorder: Window border colors
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
val |
string | windowText, window, highlight, face3d, shadow, scrollBar, etc. | Windows system color reference. |
lastClr |
string | 6-digit hex (000000-FFFFFF) | Fallback color if system color unavailable. |
Examples
Window Text Color with Fallback
<a:solidFill>
<a:sysClr val="windowText" lastClr="000000"/>
</a:solidFill>
using DocumentFormat.OpenXml.Drawing;
var solidFill = new SolidFill();
var sysClr = new SystemColor
{
Val = SystemColorValues.WindowText,
LastColor = "000000" // Fallback to black
};
solidFill.Append(sysClr);
Highlight Color (Selection)
<a:ln>
<a:solidFill>
<a:sysClr val="highlight" lastClr="0070C0"/>
</a:solidFill>
</a:ln>
var ln = new Outline();
var solidFill = new SolidFill();
var sysClr = new SystemColor
{
Val = SystemColorValues.Highlight,
LastColor = "0070C0" // Fallback to blue
};
solidFill.Append(sysClr);
ln.Append(solidFill);
Notes
- System colors adapt to Windows settings and themes
- lastClr attribute provides fallback color if system color unavailable
- Improves accessibility and respects user OS preferences
- Colors can be modified with tint/shade but should be used sparingly
- Essential for applications supporting Windows high contrast mode
- Typical system colors: windowText, window, highlight, face3d, shadow, scrollBar