MCPcopy Index your code
hub / github.com/simstudioai/sim / collectModifiers

Function collectModifiers

apps/sim/lib/pptx-renderer/renderer/style-resolver.ts:39–49  ·  view source on GitHub ↗

* Collect OOXML color modifier children from a color node. * Modifiers are child elements like alpha, lumMod, lumOff, tint, shade, satMod, hueMod.

(colorNode: SafeXmlNode)

Source from the content-addressed store, hash-verified

37 * Modifiers are child elements like alpha, lumMod, lumOff, tint, shade, satMod, hueMod.
38 */
39function 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.

Callers 2

resolveColorUncachedFunction · 0.85
resolveLineStyleFunction · 0.85

Calls 3

allChildrenMethod · 0.80
numAttrMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected