Class Color
Documentazione dettagliata
asRgbColor()
Converte questo colore in un RgbColor
.
Invio
RgbColor
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/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
asThemeColor()
Converte questo colore in un ThemeColor
.
Invio
ThemeColor
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/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
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/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
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."],[[["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"]]