# GC.Spread.Sheets.ColorScheme

## Content

# Class: ColorScheme

[Spread](../modules/GC.Spread).[Sheets](../modules/GC.Spread.Sheets).ColorScheme

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.ColorScheme#constructor)

### Methods

- [accent1](GC.Spread.Sheets.ColorScheme#accent1)
- [accent2](GC.Spread.Sheets.ColorScheme#accent2)
- [accent3](GC.Spread.Sheets.ColorScheme#accent3)
- [accent4](GC.Spread.Sheets.ColorScheme#accent4)
- [accent5](GC.Spread.Sheets.ColorScheme#accent5)
- [accent6](GC.Spread.Sheets.ColorScheme#accent6)
- [background1](GC.Spread.Sheets.ColorScheme#background1)
- [background2](GC.Spread.Sheets.ColorScheme#background2)
- [followedHyperlink](GC.Spread.Sheets.ColorScheme#followedhyperlink)
- [getColor](GC.Spread.Sheets.ColorScheme#getcolor)
- [hyperlink](GC.Spread.Sheets.ColorScheme#hyperlink)
- [name](GC.Spread.Sheets.ColorScheme#name)
- [textColor1](GC.Spread.Sheets.ColorScheme#textcolor1)
- [textColor2](GC.Spread.Sheets.ColorScheme#textcolor2)

## Constructors

### <a id="constructor" name="constructor"></a> 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

### <a id="accent1" name="accent1"></a> 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.

___

### <a id="accent2" name="accent2"></a> 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.

___

### <a id="accent3" name="accent3"></a> 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.

___

### <a id="accent4" name="accent4"></a> 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.

___

### <a id="accent5" name="accent5"></a> 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.

___

### <a id="accent6" name="accent6"></a> 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.

___

### <a id="background1" name="background1"></a> 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.

___

### <a id="background2" name="background2"></a> 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.

___

### <a id="followedhyperlink" name="followedhyperlink"></a> followedHyperlink

▸ **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.

___

### <a id="getcolor" name="getcolor"></a> 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.

___

### <a id="hyperlink" name="hyperlink"></a> hyperlink

▸ **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.

___

### <a id="name" name="name"></a> 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.

___

### <a id="textcolor1" name="textcolor1"></a> 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.

___

### <a id="textcolor2" name="textcolor2"></a> 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.
