Skip to content

Type Alias: SlideBackground ​

SlideBackground = { colorRef: ColorRef; source: BackgroundSource; type: "solid"; } | { gradient: GradientFill; source: BackgroundSource; type: "gradient"; } | { partName: string | null; picture: PictureFill; relId: string | null; source: BackgroundSource; type: "image"; } | object & PatternFill | { colorRef: ColorRef; idx: number | null; resolvedFill: BackgroundFill | null; source: BackgroundSource; type: "themeRef"; } | { source: BackgroundSource; type: "none"; }

A slide's effective background (p:cSld/p:bg), as a discriminated union on type. Every variant carries BackgroundSource. solid/gradient/pattern/image are what the writer authors and round-trip faithfully; themeRef is read-only (imported decks) and none is an explicit a:noFill. A themeRef keeps its raw idx for fidelity and also exposes resolvedFill — the concrete fill that idx resolves to through the slide theme's fmtScheme (null when the theme/entry cannot be resolved).