style.setCategoryColor
setCategoryColor(category: string, color: string): Promise<void>Set a uniform color for all nodes that belong to the given category.
Also updates visualMapper.categoryColors so the color manager does not
auto-assign a different palette color to this category on next access.
All SetNodeColor commands are wrapped in a single labeled transaction —
one undo step. Emits "style:changed".
category | string | Category name to target. |
color | string | CSS color string to apply. |
Returns: Promise<void>
Example
await api.style.setCategoryColor("Person", "#4363d8");