Class Color
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
內容詳盡的說明文件
asRgbColor()
將這個顏色轉換為 RgbColor。
回攻員
RgbColor:以 RgbColor 格式表示的顏色。
擲回
Error - if the color is not an RgbColor
授權
使用這個方法的指令碼需要透過下列一或多個範圍授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getColorType()
取得這個顏色的類型。
回攻員
ColorType:顏色類型。
授權
使用這個方法的指令碼需要透過下列一或多個範圍授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2026-03-06 (世界標準時間)。
[null,null,["上次更新時間:2026-03-06 (世界標準時間)。"],[],["The provided content describes an opaque color object with three methods. `asRgbColor()` converts the color to an RgbColor, returning an `RgbColor`. `asThemeColor()` converts the color to a ThemeColor, returning a `ThemeColor`. `getColorType()` identifies the color's type, returning a `ColorType`. All methods require specific authorization scopes, including `https://www.googleapis.com/auth/presentations.currentonly` and `https://www.googleapis.com/auth/presentations`. Errors are thrown if the color type is not compatible with the requested conversion.\n"]]