Class Color
Colore
Una rappresentazione di un colore.
Documentazione dettagliata
asRgbColor()
Converte questo colore in un RgbColor
.
Invio
RgbColor
: il colore RGB.
Lanci
Error
: se il colore non è un RgbColor
Autorizzazione
Gli script che utilizzano questo metodo richiedono l'autorizzazione con uno o più dei seguenti ambiti:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
asThemeColor()
Converte questo colore in un ThemeColor
.
Invio
ThemeColor
: il colore del tema.
Lanci
Error
: se il colore non è ThemeColor
.
Autorizzazione
Gli script che utilizzano questo metodo richiedono l'autorizzazione con uno o più dei seguenti ambiti:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getColorType()
Recupera il tipo di questo colore.
Invio
ColorType
: il tipo di colore.
Autorizzazione
Gli script che utilizzano questo metodo richiedono l'autorizzazione con uno o più dei seguenti ambiti:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-12-02 UTC.
[null,null,["Ultimo aggiornamento 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"]]