style

style.getCategoryColor

getCategoryColor(category: string): string

Return the color currently assigned to a category.

Reads from visualMapper.categoryColors. Auto-assigns a palette color on first lookup so it never returns undefined. The returned value reflects the visual mapper's own state, which is not undoable — api.history.undo() rolls back per-node SetNodeColor commands but leaves the mapper's category→color mapping intact (see §5.2.1 self-wrap docs).

Not undoable. Does not emit any event.

categorystringCategory name to look up.

Returns: string