(xml: string)
| 364 | } |
| 365 | |
| 366 | function parseSlideMasterBackground(xml: string): string | undefined { |
| 367 | // Look for a solid fill color in the slide master background |
| 368 | const bgBlock = between(xml, '<p:bg>', '</p:bg>') |
| 369 | if (!bgBlock) return undefined |
| 370 | // solidFill with srgbClr |
| 371 | const srgbMatch = /<a:srgbClr\b[^>]*\bval="([A-Fa-f0-9]{6})"/.exec(bgBlock) |
| 372 | if (srgbMatch) return srgbMatch[1].toUpperCase() |
| 373 | // solidFill with sysClr fallback |
| 374 | const sysMatch = /<a:sysClr\b[^>]*\blastClr="([A-Fa-f0-9]{6})"/.exec(bgBlock) |
| 375 | if (sysMatch) return sysMatch[1].toUpperCase() |
| 376 | return undefined |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * Extract a compact style summary from a binary document buffer. |
no test coverage detected