SpreadJS Documentation
Theme Constructor
GC.Spread.Sheets Namespace > Theme class : Theme Constructor
The name of the theme.
The base colors of the theme color.
The name of the heading font.
The name of the body font.
Represents a color scheme.
Syntax
var instance = new GC.Spread.Sheets.Theme(name, colorScheme, headerFont, bodyFont);
function Theme( 
   name : string,
   colorScheme : ColorScheme,
   headerFont : string,
   bodyFont : string
) : Theme;

Parameters

name
The name of the theme.
colorScheme
The base colors of the theme color.
headerFont
The name of the heading font.
bodyFont
The name of the body font.
Example
This example creates a new SpreadTheme object.
sheet.getCell(0, 0).backColor("accent 1");
sheet.getCell(1, 0).backColor("accent 6");

$("#btn").click(function () {
    var custom = new GC.Spread.Sheets.Theme("Custom");
    custom.colors().accent1("red");
    custom.colors().accent6("green");
    sheet.currentTheme(custom);
})
See Also

Reference

Theme class