Class Color
    
    
      
    
    
      
      使用集合让一切井井有条
    
    
      
      根据您的偏好保存内容并对其进行分类。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
详细文档
asRgbColor()
将此颜色转换为 RgbColor。
返回
RgbColor
抛出
Error - 如果颜色不是 RgbColor
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
 
 
asThemeColor()
将此颜色转换为 ThemeColor。
返回
ThemeColor
抛出
Error - 如果颜色不是 ThemeColor
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
 
 
getColorType()
获取此颜色的类型。
返回
ColorType - 颜色类型。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
 
 
 
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-26。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-26。"],[],["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"]]