[]
        
(Showing Draft Content)

GC.Spread.Sheets.ColorScheme

Class: ColorScheme

Spread.Sheets.ColorScheme

Table of contents

Constructors

Methods

Constructors

constructor

new ColorScheme(name, background1, background2, text1, text2, accent1, accent2, accent3, accent4, accent5, accent6, link, followedLink)

Creates a ColorScheme instance.

classdesc Represents the theme color.

example

//This example creates colors for the theme.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 1 30");

Parameters

Name Type Description
name string The owner that contains the named variable.
background1 string The theme color for background1.
background2 string The theme color for background2.
text1 string The theme color for text1.
text2 string The theme color for text2.
accent1 string The theme color for accent1.
accent2 string The theme color for accent2.
accent3 string The theme color for accent3.
accent4 string The theme color for accent4.
accent5 string The theme color for accent5.
accent6 string The theme color for accent6.
link string The color of the link.
followedLink string The color of the followedLink.

Methods

accent1

accent1(value?): any

Gets or sets the accent1 theme color of the color scheme.

example

//This example sets the accent1 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 1 30");

Parameters

Name Type Description
value? string The accent1 theme color string.

Returns

any

If no value is set, returns the accent1 theme color; otherwise, returns the color scheme.


accent2

accent2(value?): any

Gets or sets the accent2 theme color of the color scheme.

example

//This example sets the accent2 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().accent2("red");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 2");

Parameters

Name Type Description
value? string The accent2 theme color string.

Returns

any

If no value is set, returns the accent2 theme color; otherwise, returns the color scheme.


accent3

accent3(value?): any

Gets or sets the accent3 theme color of the color scheme.

example

//This example sets the accent3 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().accent3("yellow");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 3");

Parameters

Name Type Description
value? string The accent3 theme color string.

Returns

any

If no value is set, returns the accent3 theme color; otherwise, returns the color scheme.


accent4

accent4(value?): any

Gets or sets the accent4 theme color of the color scheme.

example

//This example sets the accent4 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().accent4("blue");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 4");

Parameters

Name Type Description
value? string The accent4 theme color string.

Returns

any

If no value is set, returns the accent4 theme color; otherwise, returns the color scheme.


accent5

accent5(value?): any

Gets or sets the accent5 theme color of the color scheme.

example

//This example sets the accent5 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().accent5("blue");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 5");

Parameters

Name Type Description
value? string The accent5 theme color string.

Returns

any

If no value is set, returns the accent5 theme color; otherwise, returns the color scheme.


accent6

accent6(value?): any

Gets or sets the accent6 theme color of the color scheme.

example

//This example sets the accent6 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().accent6("blue");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("accent 6");

Parameters

Name Type Description
value? string The accent6 theme color string.

Returns

any

If no value is set, returns the accent6 theme color; otherwise, returns the color scheme.


background1

background1(value?): any

Gets or sets the background1 theme color of the color scheme.

example

//This example sets the background1 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().background1("orange");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("background 1");

Parameters

Name Type Description
value? string The background1 theme color string.

Returns

any

If no value is set, returns the background1 theme color; otherwise, returns the color scheme.


background2

background2(value?): any

Gets or sets the background2 theme color of the color scheme.

example

//This example sets the background2 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().background2("orange");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("background 2");

Parameters

Name Type Description
value? string The background2 theme color string.

Returns

any

If no value is set, returns the background2 theme color; otherwise, returns the color scheme.


followedHyperlink(value?): any

Gets or sets the followed hyperlink theme color of the color scheme.

example

//This example sets the followedHyperline color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().followedHyperlink("orange");
ntheme.colors().hyperlink("red");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("followedHyperlink");
activeSheet.getCell(2, 0).backColor("hyperlink");

Parameters

Name Type Description
value? string The followed hyperlink theme color string.

Returns

any

If no value is set, returns the followed hyperlink theme color; otherwise, returns the color scheme.


getColor

getColor(name): string

Gets the color based on 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);

Parameters

Name Type Description
name string The theme color name.

Returns

string

The theme color.


hyperlink(value?): any

Gets or sets the hyperlink theme color of the color scheme.

example

//This example sets the hyperline color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().followedHyperlink("orange");
ntheme.colors().hyperlink("red");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("followedHyperlink");
activeSheet.getCell(2, 0).backColor("hyperlink");

Parameters

Name Type Description
value? string The hyperlink theme color string.

Returns

any

If no value is set, returns the hyperlink theme color; otherwise, returns the color scheme.


name

name(value?): any

Gets or sets the name of the color scheme.

example

//This example sets the theme name.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().name("green theme");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");

Parameters

Name Type Description
value? string The name.

Returns

any

If no value is set, returns the name; otherwise, returns the color scheme.


textColor1

textColor1(value?): any

Gets or sets the textcolor1 theme color of the color scheme.

example

//This example sets the textColor1 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().textColor1("orange");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("Text 1");

Parameters

Name Type Description
value? string The textcolor1 theme color string.

Returns

any

If no value is set, returns the textcolor1 theme color; otherwise, returns the color scheme.


textColor2

textColor2(value?): any

Gets or sets the textcolor2 theme color of the color scheme.

example

//This example sets the textColor2 color.
var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
ntheme.colors().accent1("lightgreen");
ntheme.colors().textColor2("orange");
activeSheet.currentTheme(ntheme);
activeSheet.getCell(0, 0).backColor("accent 1");
activeSheet.getCell(1, 0).backColor("Text 2");

Parameters

Name Type Description
value? string The textcolor2 theme color string.

Returns

any

If no value is set, returns the textcolor2 theme color; otherwise, returns the color scheme.