Home > @i2analyze/notebook-sdk > app > IElementEditorBase > setColor
app.IElementEditorBase.setColor() method
Sets or resets the color of the element.
Signature:
setColor(color: string | undefined): this;
Introduced: version 1.2
Parameters
| Parameter | Type | Description | 
|---|---|---|
| color | string | undefined | The color to set, or undefined to reset the color to the theme default. | 
Returns:
this
The element, with its color set to the specified value.
Exceptions
Error if the specified value is not in a form that CSS supports, such as a hexadecimal number, an rgb() value, or a color name.