SpreadJS Documentation
getColor Method
GC.Spread.Sheets Namespace > ColorScheme type : getColor Method
The theme color name.
Gets the color based on the theme color.
Syntax
var instance = new GC.Spread.Sheets.ColorScheme(name,
                                               background1,
                                               background2,
                                               text1,
                                               text2,
                                               accent1,
                                               accent2,
                                               accent3,
                                               accent4,
                                               accent5,
                                               accent6,
                                               link,
                                               followedLink);
var value; // Type: string
value = instance.getColor(name);
function getColor( 
   name : string
) : string;

Parameters

name
The theme color name.

Return Value

The theme color.
Example
This example gets the theme color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().followedHyperlink("orange");
ntheme.colors().hyperlink("red");
ntheme.colors().name("test");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("followedHyperlink");
activeSheet.getCell(2, 0).backColor("hyperlink");
var cname = ntheme.getColor("accent 1");
alert(cname);
See Also

Reference

ColorScheme type