[]
• new ColorScheme(name, background1, background2, text1, text2, accent1, accent2, accent3, accent4, accent5, accent6, link, followedLink)
创建 ColorScheme 实例。
classdesc 表示主题颜色。
example
//此示例为主题创建颜色。
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");
| Name | Type | Description |
|---|---|---|
name |
string |
包含命名变量的所有者。 |
background1 |
string |
背景1的主题颜色。 |
background2 |
string |
背景2的主题颜色。 |
text1 |
string |
文本1的主题颜色。 |
text2 |
string |
文本2的主题颜色。 |
accent1 |
string |
强调色1的主题颜色。 |
accent2 |
string |
强调色2的主题颜色。 |
accent3 |
string |
强调色3的主题颜色。 |
accent4 |
string |
强调色4的主题颜色。 |
accent5 |
string |
强调色5的主题颜色。 |
accent6 |
string |
强调色6的主题颜色。 |
link |
string |
链接的颜色。 |
followedLink |
string |
已访问链接的颜色。 |
▸ accent1(value?): any
获取或设置配色方案的强调色1主题颜色。
example
//此示例设置强调色1。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
强调色1主题颜色字符串。 |
any
如果未设置值,则返回强调色1主题颜色;否则返回配色方案。
▸ accent2(value?): any
获取或设置配色方案的强调色2主题颜色。
example
//此示例设置强调色2。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
强调色2主题颜色字符串。 |
any
如果未设置值,则返回强调色2主题颜色;否则返回配色方案。
▸ accent3(value?): any
获取或设置配色方案的强调色3主题颜色。
example
//此示例设置强调色3。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
强调色3主题颜色字符串。 |
any
如果未设置值,则返回强调色3主题颜色;否则返回配色方案。
▸ accent4(value?): any
获取或设置配色方案的强调色4主题颜色。
example
//此示例设置强调色4。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
强调色4主题颜色字符串。 |
any
如果未设置值,则返回强调色4主题颜色;否则返回配色方案。
▸ accent5(value?): any
获取或设置配色方案的强调色5主题颜色。
example
//此示例设置强调色5。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
强调色5主题颜色字符串。 |
any
如果未设置值,则返回强调色5主题颜色;否则返回配色方案。
▸ accent6(value?): any
获取或设置配色方案的强调色6主题颜色。
example
//此示例设置强调色6。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
强调色6主题颜色字符串。 |
any
如果未设置值,则返回强调色6主题颜色;否则返回配色方案。
▸ background1(value?): any
获取或设置配色方案的背景1主题颜色。
example
//此示例设置背景1颜色。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
背景1主题颜色字符串。 |
any
如果未设置值,则返回背景1主题颜色;否则返回配色方案。
▸ background2(value?): any
获取或设置配色方案的背景2主题颜色。
example
//此示例设置背景2颜色。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
背景2主题颜色字符串。 |
any
如果未设置值,则返回背景2主题颜色;否则返回配色方案。
▸ followedHyperlink(value?): any
获取或设置配色方案的已访问超链接主题颜色。
example
//此示例设置已访问超链接颜色。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
已访问超链接主题颜色字符串。 |
any
如果未设置值,则返回已访问超链接主题颜色;否则返回配色方案。
▸ getColor(name): string
根据主题颜色名称获取颜色。
example
//此示例获取主题颜色。
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);
| Name | Type | Description |
|---|---|---|
name |
string |
主题颜色名称。 |
string
主题颜色。
▸ hyperlink(value?): any
获取或设置配色方案的超链接主题颜色。
example
//此示例设置超链接颜色。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
超链接主题颜色字符串。 |
any
如果未设置值,则返回超链接主题颜色;否则返回配色方案。
▸ name(value?): any
获取或设置配色方案的名称。
example
//此示例设置主题名称。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
名称。 |
any
如果未设置值,则返回名称;否则返回配色方案。
▸ textColor1(value?): any
获取或设置配色方案的文本颜色1主题颜色。
example
//此示例设置文本颜色1。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
文本颜色1主题颜色字符串。 |
any
如果未设置值,则返回文本颜色1主题颜色;否则返回配色方案。
▸ textColor2(value?): any
获取或设置配色方案的文本颜色2主题颜色。
example
//此示例设置文本颜色2。
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");
| Name | Type | Description |
|---|---|---|
value? |
string |
文本颜色2主题颜色字符串。 |
any
如果未设置值,则返回文本颜色2主题颜色;否则返回配色方案。