Class Color

Color

顏色的表示法。

方法

方法傳回類型簡短說明
asRgbColor()RgbColor將這個顏色轉換為 RgbColor
asThemeColor()ThemeColor將這個顏色轉換為 ThemeColor
getColorType()ColorType取得這個顏色的類型。

內容詳盡的說明文件

asRgbColor()

將這個顏色轉換為 RgbColor

回攻員

RgbColor:RGB 顏色。

擲回

Error - if the color is not an RgbColor

授權

使用這個方法的指令碼需要下列一或多個範圍的授權:

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

asThemeColor()

將這個顏色轉換為 ThemeColor

回攻員

ThemeColor:主題顏色。

擲回

Error - 如果顏色不是 ThemeColor

授權

使用這個方法的指令碼需要下列一或多個範圍的授權:

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

getColorType()

取得這個顏色的類型。

回攻員

ColorType:顏色類型。

授權

使用這個方法的指令碼需要下列一或多個範圍的授權:

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