Appearance
@shbernal/pptxgenjs / index / BackgroundProps
Interface: BackgroundProps
Defined in: core-interfaces.ts:91
Reusable optional data/path fields. Use DataOrPathRequiredProps for APIs that require at least one source.
Extends
Properties
color?
optionalcolor?:string
Defined in: core-interfaces.ts:375
Fill color
HexColororThemeColor
Examples
ts
'FF0000' // hex color (red)ts
pptx.SchemeColor.text1 // Theme color (Text1)Inherited from
data?
optionaldata?:string
Defined in: core-interfaces.ts:88
base64-encoded string
- Useful for avoiding potential path/server issues
Example
ts
'image/png;base64,iVtDafDrBF[...]=' // pre-encoded image in base-64Inherited from
gradient?
optionalgradient?:GradientFillProps
Defined in: core-interfaces.ts:392
Native PPTX gradient fill options.
Inherited from
image?
optionalimage?:ImageFillProps
Defined in: core-interfaces.ts:403
Native PPTX picture fill options. Setting this (or type: 'image') fills the shape interior with a stretched bitmap instead of a color.
Inherited from
path?
optionalpath?:string
Defined in: core-interfaces.ts:81
URL or relative path
Example
ts
'https://onedrives.com/myimg.png` // retrieve image via URL
@example '/home/user/images/myimg.png` // retrieve image via local pathInherited from
pattern?
optionalpattern?:PatternFillProps
Defined in: core-interfaces.ts:397
Native PPTX pattern fill options.
Inherited from
transparency?
optionaltransparency?:number
Defined in: core-interfaces.ts:382
Transparency (percent)
- MS-PPT > Format Shape > Fill & Line > Fill > Transparency
- range: 0-100
Default
ts
0Inherited from
type?
optionaltype?:"none"|"image"|"pattern"|"solid"|"gradient"
Defined in: core-interfaces.ts:387
Fill type
Default
ts
'solid'