Class Color
Warna
Representasi untuk warna.
Dokumentasi mendetail
asRgbColor()
Mengonversi warna ini menjadi RgbColor
.
Pulang pergi
RgbColor
— Warna RGB.
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/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
asThemeColor()
Mengonversi warna ini menjadi ThemeColor
.
Pulang pergi
ThemeColor
— Warna tema.
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/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
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/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
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."],[[["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"]]