# GC.Spread.Sheets.Theme

## Content

# Class: Theme

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

## Table of contents

### Constructors

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

### Methods

- [bodyFont](GC.Spread.Sheets.Theme#bodyfont)
- [colors](GC.Spread.Sheets.Theme#colors)
- [headerFont](GC.Spread.Sheets.Theme#headerfont)
- [name](GC.Spread.Sheets.Theme#name)

## Constructors

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

• **new Theme**(`name`, `colorScheme`, `headerFont`, `bodyFont`)

Represents a color scheme.

**`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);
})
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the theme. |
| `colorScheme` | [`ColorScheme`](GC.Spread.Sheets.ColorScheme) | The base colors of the theme color. |
| `headerFont` | `string` | The name of the heading font. |
| `bodyFont` | `string` | The name of the body font. |

## Methods

### <a id="bodyfont" name="bodyfont"></a> bodyFont

▸ **bodyFont**(`value?`): `any`

Gets or sets the body font of the theme.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The body font. |

#### Returns

`any`

If no value is set, returns the body font; otherwise, returns the theme.

___

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

▸ **colors**(`value?`): `any`

Gets or sets the base colors of the theme.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`ColorScheme`](GC.Spread.Sheets.ColorScheme) | The base colors of the theme. |

#### Returns

`any`

If no value is set, returns the base colors of the theme; otherwise, returns the theme.

___

### <a id="headerfont" name="headerfont"></a> headerFont

▸ **headerFont**(`value?`): `any`

Gets or sets the heading font of the theme.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The heading font. |

#### Returns

`any`

If no value is set, returns the heading font; otherwise, returns the theme.

___

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

▸ **name**(`value?`): `any`

Gets or sets the name of the theme.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The theme name. |

#### Returns

`any`

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