---
title: Theme
order: 9
---
## Overview of Theme
G6 allows users to customize the appearance of graphs through themes. Themes can be used to define colors, shapes, and styles for nodes, edges, and other graph elements.
## API Reference
### Graph.getTheme()
Get the theme
```typescript
getTheme(): ThemeOptions;
```
Related Parameters
**Return Value**:
- **Type:** false \| 'light' \| 'dark' \| string
- **Description:** Current theme
### Graph.setTheme(theme)
Set the theme
```typescript
setTheme(theme: ThemeOptions | ((prev: ThemeOptions) => ThemeOptions)): void;
```
**Example**
```ts
graph.setTheme('dark');
```
Related Parameters