getColor method

Color getColor(
  1. String label
)

Returns the color associated with the given label

If no custom color is defined for label, it selects a default color from defaultNodeColors using a hash

Implementation

Color getColor(String label) {
  return nodeColors[label] ??
      defaultNodeColors[label.hashCode % defaultNodeColors.length];
}