style.setNodeColors
setNodeColors(updates: object[]): Promise<void>Set the display color of multiple nodes in a single undoable step.
All SetNodeColor commands are wrapped in a single labeled transaction
(commit f150a9fea), so the entire batch collapses into one undo step.
Does not emit "style:changed".
updates | object[] | Array of { id, color } pairs. |
Returns: Promise<void>
Example
await api.style.setNodeColors([
{ id: "s1", color: "#e6194b" },
{ id: "s2", color: "#3cb44b" },
]);