Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / BackgroundProps

Interface: BackgroundProps

Defined in: core-interfaces.ts:79

Reusable optional data/path fields. Use DataOrPathRequiredProps for APIs that require at least one source.

Extends

Properties

alpha?

optional alpha?: number

Defined in: core-interfaces.ts:356

Transparency (percent)

Deprecated

v3.3.0 - use transparency

Inherited from

ShapeFillProps.alpha


color?

optional color?: string

Defined in: core-interfaces.ts:322

Fill color

  • HexColor or ThemeColor

Examples

ts
'FF0000' // hex color (red)
ts
pptx.SchemeColor.text1 // Theme color (Text1)

Inherited from

ShapeFillProps.color


data?

optional data?: string

Defined in: core-interfaces.ts:74

base64-encoded string

  • Useful for avoiding potential path/server issues

Example

ts
'image/png;base64,iVtDafDrBF[...]=' // pre-encoded image in base-64

Inherited from

DataOrPathProps.data


fill?

optional fill?: string

Defined in: core-interfaces.ts:84

Color (hex format)

Deprecated

v3.6.0 - use ShapeFillProps instead


gradient?

optional gradient?: GradientFillProps

Defined in: core-interfaces.ts:339

Native PPTX gradient fill options.

Inherited from

ShapeFillProps.gradient


image?

optional image?: ImageFillProps

Defined in: core-interfaces.ts:350

Native PPTX picture fill options. Setting this (or type: 'image') fills the shape interior with a stretched bitmap instead of a color.

Inherited from

ShapeFillProps.image


path?

optional path?: string

Defined in: core-interfaces.ts:67

URL or relative path

Example

ts
'https://onedrives.com/myimg.png` // retrieve image via URL
@example '/home/gitbrent/images/myimg.png` // retrieve image via local path

Inherited from

DataOrPathProps.path


pattern?

optional pattern?: PatternFillProps

Defined in: core-interfaces.ts:344

Native PPTX pattern fill options.

Inherited from

ShapeFillProps.pattern


src?

optional src?: string

Defined in: core-interfaces.ts:90

source URL

Deprecated

v3.6.0 - use DataOrPathProps instead - remove in v4.0.0


transparency?

optional transparency?: number

Defined in: core-interfaces.ts:329

Transparency (percent)

  • MS-PPT > Format Shape > Fill & Line > Fill > Transparency
  • range: 0-100

Default

ts
0

Inherited from

ShapeFillProps.transparency


type?

optional type?: "none" | "image" | "pattern" | "solid" | "gradient"

Defined in: core-interfaces.ts:334

Fill type

Default

ts
'solid'

Inherited from

ShapeFillProps.type