Class ColorScheme

ColorScheme

色彩配置會定義從 ThemeColorType 成員到用於算繪的實際顏色之間的對應。

方法

方法傳回類型簡短說明
getConcreteColor(theme)Color傳回與這個色彩配置中的 ThemeColorType 相關聯的具體 Color
getThemeColors()ThemeColorType[]傳回色彩配置中所有可能的主題顏色類型清單。
setConcreteColor(type, color)ColorScheme將這個色彩配置中與 ThemeColorType 相關聯的具體顏色設為指定顏色。
setConcreteColor(type, red, green, blue)ColorScheme將這個色彩配置中與 ThemeColorType 相關聯的具體顏色,設為 RGB 格式的指定顏色。
setConcreteColor(type, hexColor)ColorScheme將這個色彩配置中與 ThemeColorType 相關聯的具體顏色,設為十六進位格式的指定顏色。

內容詳盡的說明文件

getConcreteColor(theme)

傳回與這個色彩配置中 ThemeColorType 相關聯的具體 Color

傳回的顏色保證不是 ThemeColor 的例項。

參數

名稱類型說明
themeThemeColorType要從中衍生具體顏色的主題顏色。

回攻員

Color:這個配置中與主題顏色類型對應的具體顏色。

授權

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

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

getThemeColors()

傳回色彩配置中所有可能的主題顏色類型清單。

回攻員

ThemeColorType[]:這個配置中可能的主題色彩類型。

授權

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

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

setConcreteColor(type, color)

將這個色彩配置中與 ThemeColorType 相關聯的具體顏色設為指定顏色。

參數

名稱類型說明
typeThemeColorType主題顏色類型。
colorColor要將主題顏色類型設為的顏色。

回攻員

ColorScheme - 這個色彩配置用於鏈結。

授權

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

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

setConcreteColor(type, red, green, blue)

將這個色彩配置中與 ThemeColorType 相關聯的具體顏色,設為 RGB 格式的指定顏色。

參數

名稱類型說明
typeThemeColorType主題顏色類型。
redInteger要將主題顏色類型設為的顏色紅色值 (介於 0 和 255 之間)。
greenInteger要將主題顏色類型設為的顏色綠色值 (介於 0 和 255 之間)。
blueInteger要將主題顏色類型設為的顏色藍色值 (介於 0 和 255 之間)。

回攻員

ColorScheme - 這個色彩配置用於鏈結。

授權

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

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

setConcreteColor(type, hexColor)

將這個色彩配置中與 ThemeColorType 相關聯的具體顏色,設為十六進位格式的指定顏色。

十六進位字串的格式必須為「#RRGGBB」。

參數

名稱類型說明
typeThemeColorType主題顏色類型。
hexColorString要將主題顏色類型設為的十六進位顏色,例如「#F304a7」。

回攻員

ColorScheme - 這個色彩配置用於鏈結。

授權

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

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