PageBackground

Describes the page's background

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/page-background#getPictureFill()` | `https://developers.google.com/apps-script/reference/slides/picture-fill|null` | Get the stretched picture fill of this background, or `null` if the background fill type is not `https://developers.google.com/apps-script/reference/slides/page-background-type#PICTURE`. |
| `https://developers.google.com/apps-script/reference/slides/page-background#getSolidFill()` | `https://developers.google.com/apps-script/reference/slides/solid-fill|null` | Get the solid fill of this background, or `null` if the background fill type is not `https://developers.google.com/apps-script/reference/slides/page-background-type#SOLID`. |
| `https://developers.google.com/apps-script/reference/slides/page-background#getType()` | `https://developers.google.com/apps-script/reference/slides/page-background-type` | Get the type of this page background. |
| `https://developers.google.com/apps-script/reference/slides/page-background#isVisible()` | `Boolean` | Whether the background is visible. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setPictureFill(BlobSource)` | `void` | Sets an image from the specified image blob as the page background. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setPictureFill(String)` | `void` | Sets the image at the provided URL as the page background. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(Color)` | `void` | Sets the solid fill to the given `https://developers.google.com/apps-script/reference/slides/color`. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(Color,Number)` | `void` | Sets the solid fill to the given alpha and `https://developers.google.com/apps-script/reference/slides/color`. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(Integer,Integer,Integer)` | `void` | Sets the solid fill to the given RGB values. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(Integer,Integer,Integer,Number)` | `void` | Sets the solid fill to the given alpha and RGB values. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(String)` | `void` | Sets the solid fill to the given hex color string. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(String,Number)` | `void` | Sets the solid fill to the given alpha and hex color string. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(ThemeColorType)` | `void` | Sets the solid fill to the given `https://developers.google.com/apps-script/reference/slides/theme-color-type`. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setSolidFill(ThemeColorType,Number)` | `void` | Sets the solid fill to the given alpha and `https://developers.google.com/apps-script/reference/slides/theme-color-type`. |
| `https://developers.google.com/apps-script/reference/slides/page-background#setTransparent()` | `void` | Sets the background to transparent. |

## Detailed documentation

### `getPictureFill()`

Get the stretched picture fill of this background, or `null` if the background fill type
is not `https://developers.google.com/apps-script/reference/slides/page-background-type#PICTURE`.

#### Return


`https://developers.google.com/apps-script/reference/slides/picture-fill|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSolidFill()`

Get the solid fill of this background, or `null` if the background fill type is not
`https://developers.google.com/apps-script/reference/slides/page-background-type#SOLID`.

#### Return


`https://developers.google.com/apps-script/reference/slides/solid-fill|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getType()`

Get the type of this page background.

#### Return


`https://developers.google.com/apps-script/reference/slides/page-background-type`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `isVisible()`

Whether the background is visible.

#### Return


`Boolean`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setPictureFill(blobSource)`

Sets an image from the specified image blob as the page background. The image is stretched to
match the dimensions of the page.

Inserting the image fetches it from the `https://developers.google.com/apps-script/reference/base/blob-source.html` once and a copy is stored for
display inside the presentation. Images must be less than 50MB in size, cannot exceed 25
megapixels, and must be in either in PNG, JPEG, or GIF format.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `blobSource` | `https://developers.google.com/apps-script/reference/base/blob-source.html` | The image data. |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setPictureFill(imageUrl)`

Sets the image at the provided URL as the page background. The image is stretched to match the
dimensions of the page.

Inserting the image fetches it from the URL once and a copy is stored for display inside the
presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be
in either in PNG, JPEG, or GIF format.

The provided URL must be publicly accessible and no larger than 2kB. The URL itself is saved
with the image and exposed via `https://developers.google.com/apps-script/reference/slides/picture-fill#getSourceUrl()`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `imageUrl` | `String` | The URL to download the image from. |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(color)`

Sets the solid fill to the given `https://developers.google.com/apps-script/reference/slides/color`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `color` | `https://developers.google.com/apps-script/reference/slides/color` | The color to set. |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(color, alpha)`

Sets the solid fill to the given alpha and `https://developers.google.com/apps-script/reference/slides/color`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `color` | `https://developers.google.com/apps-script/reference/slides/color` | The color to set. |
| `alpha` | `Number` | The alpha value (transparency). |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(red, green, blue)`

Sets the solid fill to the given RGB values.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `red` | `Integer` | The red component. |
| `green` | `Integer` | The green component. |
| `blue` | `Integer` | The blue component. |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(red, green, blue, alpha)`

Sets the solid fill to the given alpha and RGB values.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `red` | `Integer` | The red component. |
| `green` | `Integer` | The green component. |
| `blue` | `Integer` | The blue component. |
| `alpha` | `Number` | The alpha value (transparency). |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(hexString)`

Sets the solid fill to the given hex color string.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `hexString` | `String` | The hex color string. |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(hexString, alpha)`

Sets the solid fill to the given alpha and hex color string.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `hexString` | `String` | The hex color string. |
| `alpha` | `Number` | The alpha value (transparency). |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(color)`

Sets the solid fill to the given `https://developers.google.com/apps-script/reference/slides/theme-color-type`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `color` | `https://developers.google.com/apps-script/reference/slides/theme-color-type` | The theme color type. |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setSolidFill(color, alpha)`

Sets the solid fill to the given alpha and `https://developers.google.com/apps-script/reference/slides/theme-color-type`.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `color` | `https://developers.google.com/apps-script/reference/slides/theme-color-type` | The theme color type. |
| `alpha` | `Number` | The alpha value (transparency). |

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setTransparent()`

Sets the background to transparent.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`