a:outerShdw (Outer Shadow)
Applies an outer shadow effect to shapes with configurable blur, distance, angle, and color.
Parent elements
Child elements
## Description
`a:outerShdw` applies an **outer shadow effect** to a DrawingML shape. It is defined in **ECMA-376 Part 1 §20.1.8.18**.
The shadow appears outside the shape outline with the following properties:
- **Blur radius** – How soft/blurred the shadow edges are
- **Distance** – How far the shadow extends from the shape
- **Direction** – Angle at which the shadow projects (in 60,000ths of a degree)
- **Alignment** – Where the shadow originates (top-left, center, bottom-right, etc.)
- **Opacity/Color** – Shadow color and transparency
## Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
| `blurRad` | `ST_Coordinate32` | 0 to 2147483647 (EMUs) | Blur radius for soft shadow edges; 0 = sharp edge. |
| `dist` | `ST_Coordinate32` | 0 to 2147483647 (EMUs) | Distance the shadow extends from the shape boundary. |
| `dir` | `ST_PositiveFixedAngle` | 0 to 21600000 (in 60,000ths of a degree) | Direction angle; 0° = right, 2700000 = 90° down. |
| `algn` | `ST_RectAlignment` | `tl`, `t`, `tr`, `l`, `ctr`, `r`, `bl`, `b`, `br` | Shadow alignment relative to the shape. |
| `rotWithShape` | `xsd:boolean` | 0 \| 1 | If true, shadow rotates with the shape. |
| `sx` | `ST_Percentage` | -100000 to 100000 (in 1000ths of %) | Horizontal scaling. |
| `sy` | `ST_Percentage` | -100000 to 100000 (in 1000ths of %) | Vertical scaling. |
| `kx` | `ST_FixedAngle` | -5400000 to 5400000 (in 60,000ths of a degree) | Horizontal skew/shear. |
| `ky` | `ST_FixedAngle` | -5400000 to 5400000 (in 60,000ths of a degree) | Vertical skew/shear. |
| `algn` | `ST_RectAlignment` | `tl`, `t`, `tr`, `l`, `ctr`, `r`, `bl`, `b`, `br` | Shadow position reference. |
| `tau` | `ST_Percentage` | 0 to 100000 (in 1000ths of %) | Vertical offset (tau parameter). |
## Examples
### Simple Black Outer Shadow
### Soft Blurred Shadow with Center Alignment
### Colored Shadow with Scheme Color
## Notes
- **Blur radius** typically ranges 25400–76200 EMUs (0.03–0.08 inches) for natural-looking shadows.
- **Distance** is the offset from the shape; 25400–76200 EMUs is typical.
- **Direction angle**: 0° = right, 2700000 (90°) = down, 5400000 (180°) = left, 8100000 (270°) = up.
- **EMU conversion**: 914400 EMUs = 1 inch; 38100 EMUs ≈ 0.042 inches.
- **Shadow color** is usually dark (black or dark gray) with transparency (alpha < 100000).
- **Scheme colors** can be used instead of RGB for theme-aware shadows.
- The `rotWithShape` attribute controls whether the shadow rotates when the shape is rotated.
## Notes
- The permitted child elements and attribute values depend on the surrounding OOXML part and the schema version in use.
- In practice, DrawingML content is usually generated from higher-level shape or picture APIs rather than built manually element-by-element.
- When this element appears inside a document package, it is typically linked by relationships or contained in a drawing part that is referenced from a shape or graphic object.
<a:outerShdw blurRad="38100" dist="38100" dir="2700000" algn="tl" rotWithShape="0">
<a:srgbClr val="000000">
<a:alpha val="50000"/>
</a:srgbClr>
</a:outerShdw>
using DocumentFormat.OpenXml.Drawing;
var shadow = new OuterShadow
{
BlurRadius = 38100,
Distance = 38100,
Direction = 2700000, // 90 degrees
Alignment = RectangleAlignmentValues.TopLeft,
RotateWithShape = false
};
// Add semi-transparent black color
var color = new RgbColorModelHex { Val = "000000" };
color.Append(new Alpha { Val = 50000 }); // 50% opacity
shadow.Append(color);
<a:outerShdw blurRad="76200" dist="50800" dir="5400000" algn="ctr" rotWithShape="1">
<a:srgbClr val="4A4A4A">
<a:alpha val="40000"/>
</a:srgbClr>
</a:outerShdw>
var shadow = new OuterShadow
{
BlurRadius = 76200, // More blur
Distance = 50800, // Farther distance
Direction = 5400000, // 135 degrees (diagonal)
Alignment = RectangleAlignmentValues.Center,
RotateWithShape = true // Rotate with shape
};
var color = new RgbColorModelHex { Val = "4A4A4A" };
color.Append(new Alpha { Val = 40000 }); // 40% opacity
shadow.Append(color);
<a:outerShdw blurRad="50800" dist="63500" dir="2700000" algn="bl" rotWithShape="0">
<a:schemeClr val="accent1">
<a:alpha val="60000"/>
</a:schemeClr>
</a:outerShdw>
var shadow = new OuterShadow
{
BlurRadius = 50800,
Distance = 63500,
Direction = 2700000,
Alignment = RectangleAlignmentValues.BottomLeft,
RotateWithShape = false
};
var color = new SchemeColor { Val = ColorSchemeIndexValues.Accent1 };
color.Append(new Alpha { Val = 60000 }); // 60% opacity
shadow.Append(color);