
# Class: SetThemeCommand

A command that defines product themes.
A command that defines product themes.

For details, you can refer to the [ICanvasDefinitionSetTheme](../interfaces/icanvasdefinitionsettheme.md).
```
{
  "type": "canvas",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setTheme": {
      "primary": "{{ "#f00" }}",
      "secondary": "{{ "#0f0" }}"
    }
  }
}
```

For details, you can refer to the [IDesignEditorDefinitionSetTheme](../interfaces/idesigneditordefinitionsettheme.md).
```
{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setTheme": {
      "primary": "{{ "#f00" }}",
      "secondary": "{{ "#0f0" }}"
    }
  }
}
```

## Hierarchy

* [CanvasWidgetCommand](canvaswidgetcommand.md)

* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)

  ↳ **SetThemeCommand**

## Index

### Methods

* [execute](setthemecommand.md#execute)

## Methods

###  execute

▸ **execute**(`param`: [ICanvasDefinitionSetTheme](../interfaces/icanvasdefinitionsettheme.md)): *Promise‹any›*

*Overrides [CanvasWidgetCommand](canvaswidgetcommand.md).[execute](canvaswidgetcommand.md#abstract-execute)*

Executes this command.

**Parameters:**

Name | Type |
------ | ------ |
`param` | [ICanvasDefinitionSetTheme](../interfaces/icanvasdefinitionsettheme.md) |

**Returns:** *Promise‹any›*
