Class Color
Dokumentasi mendetail
asRgbColor()
Mengonversi warna ini menjadi RgbColor
.
Pulang pergi
RgbColor
Menampilkan
Error
— jika warna bukan RgbColor
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
asThemeColor()
Mengonversi warna ini menjadi ThemeColor
.
Pulang pergi
ThemeColor
Menampilkan
Error
— jika warna bukan ThemeColor
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getColorType()
Mendapatkan jenis warna ini.
Pulang pergi
ColorType
— Jenis warna.
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-12-02 UTC.
[null,null,["Terakhir diperbarui pada 2024-12-02 UTC."],[[["This documentation describes how to work with opaque colors in Google Apps Script's Slides service."],["`Color` objects can be converted to RGB or Theme colors using the `asRgbColor()` and `asThemeColor()` methods."],["`getColorType()` allows you to retrieve the specific type of a given color."],["Using any of these methods requires authorization with the `presentations.currentonly` or `presentations` scopes."]]],["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"]]