Color

An opaque color

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/color#asRgbColor()` | `https://developers.google.com/apps-script/reference/base/rgb-color.html` | Converts this color to an `https://developers.google.com/apps-script/reference/base/rgb-color.html`. |
| `https://developers.google.com/apps-script/reference/slides/color#asThemeColor()` | `https://developers.google.com/apps-script/reference/slides/theme-color` | Converts this color to a `https://developers.google.com/apps-script/reference/slides/theme-color`. |
| `https://developers.google.com/apps-script/reference/slides/color#getColorType()` | `https://developers.google.com/apps-script/reference/base/color-type.html` | Get the type of this color. |

## Detailed documentation

### `asRgbColor()`

Converts this color to an `https://developers.google.com/apps-script/reference/base/rgb-color.html`.

#### Return


`https://developers.google.com/apps-script/reference/base/rgb-color.html` --- The color as an `https://developers.google.com/apps-script/reference/base/rgb-color.html`.

#### Throws


[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- if the color is not an `https://developers.google.com/apps-script/reference/base/rgb-color.html`

#### 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`

*** ** * ** ***

### `asThemeColor()`

Converts this color to a `https://developers.google.com/apps-script/reference/slides/theme-color`.

#### Return


`https://developers.google.com/apps-script/reference/slides/theme-color` --- The color as a `https://developers.google.com/apps-script/reference/slides/theme-color`.

#### Throws


[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- if the color is not a `https://developers.google.com/apps-script/reference/slides/theme-color`

#### 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`

*** ** * ** ***

### `getColorType()`

Get the type of this color.

#### Return


`https://developers.google.com/apps-script/reference/base/color-type.html` --- The 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`