Class Color

Color

A representation for a color.

Methods

Method Return type Brief description
RgbColor Converts this color to an RgbColor .
ThemeColor Converts this color to a ThemeColor .
ColorType Get the type of this color.

Detailed documentation

asRgbColor()

Converts this color to an RgbColor .

Return

RgbColor — The RGB color.

Throws

Error — if the color is not an RgbColor

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

asThemeColor()

Converts this color to a ThemeColor .

Return

ThemeColor — The theme color.

Throws

Error — if the color is not a ThemeColor .

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getColorType()

Get the type of this color.

Return

ColorType — The color type.

Authorization

Scripts that use this method require authorization with one or more of the following scopes :

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets