Class SolidFill
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Solid填充
純色填滿。
SolidFill
物件是分離且不可變動的,因此不會反映建立後所做的變更。
內容詳盡的說明文件
getAlpha()
取得色彩的不透明度,範圍為 [0, 1.0],其中 1.0 表示完全不透明。
回攻員
Number
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getColor()
取得填滿的顏色。
回攻員
Color
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eSolidFill\u003c/code\u003e represents a solid color fill used in Google Slides, and these objects are immutable, meaning they won't change after creation.\u003c/p\u003e\n"],["\u003cp\u003eYou can get the opacity of the fill using \u003ccode\u003egetAlpha()\u003c/code\u003e, which returns a number between 0 and 1, where 1 is fully opaque.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetColor()\u003c/code\u003e method allows you to retrieve the color of the fill as a \u003ccode\u003eColor\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eTo use these methods, your script needs authorization with specific scopes related to Google Presentations.\u003c/p\u003e\n"]]],[],null,["# Class SolidFill\n\nSolidFill\n\nA solid color fill.\n\n\n`Solid``Fill` objects are detached and immutable, so do not reflect changes made after\nthey have been created. \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------|----------------------------------------------|----------------------------------------------------------------------------------------------|\n| [getAlpha()](#getAlpha()) | `Number` | Get the opacity of the color, in the interval from \\[0, 1.0\\], where 1.0 means fully opaque. |\n| [getColor()](#getColor()) | [Color](/apps-script/reference/slides/color) | Get the color of the fill. |\n\nDetailed documentation\n----------------------\n\n### `get``Alpha()`\n\nGet the opacity of the color, in the interval from \\[0, 1.0\\], where 1.0 means fully opaque.\n\n#### Return\n\n\n`Number`\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n### `get``Color()`\n\nGet the color of the fill.\n\n#### Return\n\n\n[Color](/apps-script/reference/slides/color)\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`"]]