Creates a new AutoColorGenerator
Optional configuration for color generation
Generate a color style for a specific node type
The type of node to generate colors for
The current theme name (affects color adjustments)
NodeStyleConfig with fill, stroke, strokeWidth, and opacity
Reset the generator, clearing all type-to-index mappings Useful when changing themes or restarting color assignments
Get the number of unique types that have been assigned colors
Check if a type has been assigned a color
Get all assigned node types
AutoColorGenerator - Automatically generates visually distinct colors for node types
Uses the golden ratio method to ensure maximum perceptual distinction between colors. Colors are generated deterministically - the same node type will always receive the same color.
Example