Class ThemeColorTransforms
The color transforms WordprocessingML and DrawingML apply to theme colors. Word does NOT scale sRGB channels directly: w:themeTint and w:themeShade modulate luminance in HSL space with the result truncated per channel — verified against Word-written values (accent1 4472C4 with themeTint 99 yields 8EAADB, with themeShade BF yields 2F5496; see WORDQUIRKS.md).
public static class ThemeColorTransforms
- Inheritance
-
ThemeColorTransforms
- Inherited Members
Methods
- ApplyDrawingShade(ColorRgb, int)
Applies a DrawingML a:shade transform (§20.1.2.3.31): the color is multiplied toward black in linear RGB, not HSL.
- ApplyDrawingTint(ColorRgb, int)
Applies a DrawingML a:tint transform (§20.1.2.3.34): the color moves toward white in linear RGB.
- ApplyShade(ColorRgb, byte)
Applies a w:themeShade transform: luminance moves toward black in HSL space (L' = L·shade/255); 0xFF is identity, 0x00 is black.
- ApplyTint(ColorRgb, byte)
Applies a w:themeTint transform: luminance moves toward white in HSL space (L' = 1 − (1 − L)·tint/255); 0xFF is identity, 0x00 is white.
- ModulateLuminance(ColorRgb, double, double)
Applies DrawingML luminance modulation and offset (a:lumMod / a:lumOff, §20.1.2.3.20/.21) in HSL space: L' = L·lumMod + lumOff, clamped to [0,1].