Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Class Color
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תיעוד מפורט
asRgbColor()
הפונקציה ממירה את הצבע ל-RgbColor.
חזרה
RgbColor — צבע ה-RGB.
מקפיצה את הודעות השגיאה (Throws)
Error – אם הצבע הוא לא RgbColor
אישור
סקריפטים שמשתמשים בשיטה הזו דורשים הרשאה עם אחת או יותר מההיקפים הבאים:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
asThemeColor()
הפונקציה ממירה את הצבע הזה ל-ThemeColor.
חזרה
ThemeColor – צבע העיצוב.
מקפיצה את הודעות השגיאה (Throws)
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
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-04-13 (שעון UTC).
[null,null,["עדכון אחרון: 2026-04-13 (שעון UTC)."],[],["The core content defines a \"Color\" representation with three methods. `asRgbColor()` converts the color to an `RgbColor`, returning the RGB color and throwing an error if it's not an `RgbColor`. `asThemeColor()` converts the color to a `ThemeColor`, returning the theme color and throwing an error if it's not a `ThemeColor`. `getColorType()` retrieves and returns the color's type as a `ColorType`. Each method requires specific authorization scopes.\n"]]