setCurrentPageBackground

API reference for the setCurrentPageBackground method.

Updates the background of the user's current page. The background can be a solid color, an image or a video.

#optsPageBackgroundFill
Required

The appearance of a page's background.

Properties of opts
#assetobject
Optional

An image or video to use as the fill.

An image asset that fills a path's interior.

#typestring
Required

The type of fill.

This must be "image".

#refImageRef
Required

A unique identifier that points to an image asset in Canva's backend.

#colorstring
Optional

The color of the fill as a hex code.

The hex code must include all six characters and be prefixed with a # symbol.

Example

" #ff0099"
ts

Promise<void>