SheetXL - v0.3.20
    Preparing search index...

    Interface ITheme

    Defines and manages themes associated to a specific document or spreadsheet.

    These themes are saved and shared with the document, ensuring a consistent look and feel across different views or users.

    ITheme focuses on styling the content within the document itself, such as:

    • Applying schema colors (Accent1, Accent2, etc.) to elements like charts, shapes, and tables.
    • Controlling font styles and colors used within the document.
    • Customizing other visual aspects specific to the document's content.

    This is distinct from an AppTheme, which controls the styling of the application's user interface (UI) itself, such as the toolbar, menus, and overall color scheme, and can be specific to the application or individual user preferences.

    interface ITheme {
        getColorScheme(): IColorScheme;
        getFontScheme(): IFontScheme;
        getName(): string;
        isCustom(): boolean;
        parseColor(str: string): IColor;
        schemeLookup(): SchemeLookup;
        toJSON(includeInherited?: boolean): JSON;
    }

    Implemented by

    Index

    Methods

    • Human readable text describing the theme.

      Returns string

    • If a custom theme or built in theme.

      Returns boolean

    • Parses the color using the current Theme schema (if required)

      Parameters

      • str: string

        The string to parse

      Returns IColor

      Error If the string does not parse to a valid color.

      In most instances the scheme lookup from the style should be used unless specifically rendering for a theme.

    • This is available for functions that want to resolve themed colors

      Returns SchemeLookup

      In most instances the scheme lookup from the style should be used unless specifically rendering for a theme (for example a theme chooser).

    • Creates a persistable version of Themes.

      Parameters

      • OptionalincludeInherited: boolean

        If true then the inherited properties will be included.

      Returns JSON