
# Class: SetThemeCommand

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

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

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

## Hierarchy

* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)

* [CanvasWidgetCommand](canvaswidgetcommand.md)

  ↳ **SetThemeCommand**

## Index

### Methods

* [execute](setthemecommand.md#execute)

## Methods

###  execute

▸ **execute**(`param`: [IDesignEditorDefinitionSetTheme](../interfaces/idesigneditordefinitionsettheme.md)): *Promise‹void›*

*Overrides [DesignEditorWidgetCommand](designeditorwidgetcommand.md).[execute](designeditorwidgetcommand.md#abstract-execute)*

Executes this command.

**Parameters:**

Name | Type |
------ | ------ |
`param` | [IDesignEditorDefinitionSetTheme](../interfaces/idesigneditordefinitionsettheme.md) |

**Returns:** *Promise‹void›*
