Class Color
Tài liệu chi tiết
asRgbColor()
Chuyển đổi màu này thành RgbColor
.
Cầu thủ trả bóng
RgbColor
– Màu RGB.
Gửi
Error
– nếu màu không phải là RgbColor
Ủ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
asThemeColor()
Chuyển đổi màu này thành ThemeColor
.
Cầu thủ trả bóng
ThemeColor
– Màu giao diện.
Gửi
Error
– nếu màu không phải là ThemeColor
.
Ủ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
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
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: 2024-12-02 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-12-02 UTC."],[[["Represents a color and provides methods for manipulation."],["Offers methods to convert between RGB and Theme color representations."],["Allows retrieval of the underlying color type (RGB or Theme)."],["All methods require authorization with specific scopes for Google Spreadsheets access."]]],["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"]]