Class ThemeColor
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
ThemeColor
Biểu thị cho màu giao diện.
Tài liệu chi tiết
getColorType()
Lấy loại màu này.
Cầu thủ trả bóng
ColorType
– Loại màu.
Ủy quyền
Các tập lệnh sử dụng phương thức này yêu cầu được uỷ quyền với một hoặc nhiều phạm vi sau:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getThemeColorType()
Lấy loại màu giao diện của màu này.
Cầu thủ trả bóng
ThemeColorType
– Loại màu giao diện.
Ủy quyền
Các tập lệnh sử dụng phương thức này yêu cầu được uỷ quyền với một hoặc nhiều phạm vi sau:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eThemeColor\u003c/code\u003e represents a theme color within Google Apps Script and provides methods for interacting with it.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two methods: \u003ccode\u003egetColorType()\u003c/code\u003e to determine the color's type (e.g., RGB, HEX) and \u003ccode\u003egetThemeColorType()\u003c/code\u003e to identify its specific theme color type (e.g., ACCENT1, TEXT1).\u003c/p\u003e\n"],["\u003cp\u003eBoth methods require authorization with scopes such as \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets.currentonly\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets\u003c/code\u003e before use.\u003c/p\u003e\n"]]],["ThemeColor provides a representation for a theme color. Key actions involve retrieving color information: `getColorType()` returns the color's type, and `getThemeColorType()` returns the specific theme color type. Both methods require authorization scopes `https://www.googleapis.com/auth/spreadsheets.currentonly` or `https://www.googleapis.com/auth/spreadsheets` to be used within scripts.\n"],null,["# Class ThemeColor\n\nThemeColor\n\nA representation for a theme color. \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------|-----------------------------------------------------------------------|------------------------------------------|\n| [getColorType()](#getColorType()) | [ColorType](../base/color-type.html) | Get the type of this color. |\n| [getThemeColorType()](#getThemeColorType()) | [ThemeColorType](/apps-script/reference/spreadsheet/theme-color-type) | Gets the theme color type of this color. |\n\nDetailed documentation\n----------------------\n\n### `get``Color``Type()`\n\nGet the type of this color.\n\n#### Return\n\n\n[ColorType](../base/color-type.html) --- The color type.\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/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Theme``Color``Type()`\n\nGets the theme color type of this color.\n\n#### Return\n\n\n[ThemeColorType](/apps-script/reference/spreadsheet/theme-color-type) --- The theme color type.\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/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`"]]