[]
        
(Showing Draft Content)

IThemeColor

Interface IThemeColor


public interface IThemeColor
Represents the theme color information.

An IThemeColor object describes an individual color entry in a workbook theme color scheme, including the entry's RGB color value and its corresponding ThemeColor entry. Instances are typically obtained from ITheme.getThemeColorScheme() and IThemeColorScheme.get(ThemeColor).


 Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
 workbook.setTheme(theme);
 IThemeColor themeColor = workbook.getTheme().getThemeColorScheme().get(ThemeColor.Accent1);
 themeColor.setRGB(Color.GetRed());
 Color rgb = themeColor.getRGB();
 ThemeColor index = themeColor.getThemeColorSchemeIndex();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the RGB color of this theme color entry.
    Gets the theme color scheme index.
    void
    setRGB(Color value)
    Sets the RGB color of this theme color entry.
  • Method Details

    • getRGB

      Color getRGB()
      Gets the RGB color of this theme color entry.

      Returns the resolved Color value associated with the current ThemeColor in the workbook theme color scheme.

      
       Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
       workbook.setTheme(theme);
       IThemeColor themeColor = workbook.getTheme().getThemeColorScheme().get(ThemeColor.Accent1);
       Color rgb = themeColor.getRGB();
       
      Returns:
      The RGB color of this theme color entry.
    • setRGB

      void setRGB(Color value)
      Sets the RGB color of this theme color entry.

      Sets the resolved Color value associated with the current ThemeColor in the workbook theme color scheme.

      
       Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
       workbook.setTheme(theme);
       IThemeColor themeColor = workbook.getTheme().getThemeColorScheme().get(ThemeColor.Accent1);
       themeColor.setRGB(Color.GetRed());
       
      Parameters:
      value - The RGB color of this theme color entry.
    • getThemeColorSchemeIndex

      ThemeColor getThemeColorSchemeIndex()
      Gets the theme color scheme index.

      This value identifies which ThemeColor entry in the owning theme color scheme, such as ThemeColor.Light1 or ThemeColor.Accent1, the current theme color represents.

      
       ITheme theme = new Theme("CustomTheme");
       IThemeColor themeColor = theme.getThemeColorScheme().get(ThemeColor.Accent1);
       ThemeColor index = themeColor.getThemeColorSchemeIndex();
       
      Returns:
      The ThemeColor value that identifies this theme color within the theme color scheme.