a:alphaOff (Alpha Offset)
Alpha offset adjustment for a color.
Description
a:alphaOff is a DrawingML element used to describe part of a shape, chart, image, or text run. It is defined in ECMA-376 Part 1.
This article documents the a:alphaOff element from the DrawingML schema (ECMA-376 Part 1). The element is used to apply an offset to the alpha channel of a color value (for example to slightly lighten or darken a color’s transparency).
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
val |
ST_FixedPercentage | 0..100000 | Offset value applied to the alpha channel (in DrawingML fixed-percentage units). |
Examples
<alphaOff>
<!-- Example DrawingML content -->
</alphaOff>
using System.Xml.Linq;
var ns = "http://schemas.openxmlformats.org/drawingml/2006/main";
var solidFill = new XElement(XName.Get("solidFill", ns),
new XElement(XName.Get("srgbClr", ns),
new XAttribute("val", "FF0000"),
new XElement(XName.Get("alphaOff", ns), new XAttribute("val", "25000"))
)
);
// Serialize or insert `solidFill` into the drawing XML where a fill is expected.
// For Open XML SDK usage, the same structure is represented by the
// `SolidFill` / `RgbColorModelHex` elements and a child alpha element.
Notes
- DrawingML elements are commonly used inside shape properties, text bodies, charts, and image fills.
- The exact allowed content model depends on the surrounding OOXML part and the schema version in use.