style

style.setNodeColor

setNodeColor(nodeId: string, color: string): Promise<void>

Set the display color of a single node.

Recorded in history as "SetNodeColor". Does not emit "style:changed".

nodeIdstringId of the node to color.
colorstringCSS color string (e.g. "#ff0000" or "red").

Returns: Promise<void>

Example

await api.style.setNodeColor("s1", "#3cb44b");