(xml: string, slot: string)
| 71 | } |
| 72 | |
| 73 | function parseColorSlot(xml: string, slot: string): string { |
| 74 | const inner = between(xml, `<a:${slot}>`, `</a:${slot}>`) |
| 75 | if (!inner) return '' |
| 76 | // srgbClr uses val=; sysClr has val="windowText" but lastClr holds the fallback hex |
| 77 | const srgb = attr(inner, 'val') |
| 78 | if (srgb && inner.includes('<a:srgbClr')) return srgb.toUpperCase() |
| 79 | const lastClr = attr(inner, 'lastClr') |
| 80 | if (lastClr) return lastClr.toUpperCase() |
| 81 | return '' |
| 82 | } |
| 83 | |
| 84 | function parseFontScheme(xml: string): { major: string; minor: string } { |
| 85 | const major = between(xml, '<a:majorFont>', '</a:majorFont>') |
no test coverage detected