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

Function parseSlideMasterBackground

apps/sim/lib/copilot/vfs/document-style.ts:366–377  ·  view source on GitHub ↗
(xml: string)

Source from the content-addressed store, hash-verified

364}
365
366function 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.

Callers 1

extractDocumentStyleFunction · 0.85

Calls 1

betweenFunction · 0.85

Tested by

no test coverage detected