* Collect OOXML color modifier children from a color node. * Modifiers are child elements like alpha, lumMod, lumOff, tint, shade, satMod, hueMod.
(colorNode: SafeXmlNode)
| 37 | * Modifiers are child elements like alpha, lumMod, lumOff, tint, shade, satMod, hueMod. |
| 38 | */ |
| 39 | function collectModifiers(colorNode: SafeXmlNode): ColorModifier[] { |
| 40 | const modifiers: ColorModifier[] = [] |
| 41 | for (const child of colorNode.allChildren()) { |
| 42 | const name = child.localName |
| 43 | const val = child.numAttr('val') |
| 44 | if (val !== undefined && name) { |
| 45 | modifiers.push({ name, val }) |
| 46 | } |
| 47 | } |
| 48 | return modifiers |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Resolve a scheme color name through the master colorMap then theme colorScheme. |
no test coverage detected