style.setRelationshipColor
setRelationshipColor(relationship: string, color: string): Promise<void>Set a uniform color for all edges of the given relationship type.
Also updates visualMapper.relationshipColors so the color manager does
not auto-assign a different palette color on next access. All SetEdgeColor
commands are wrapped in a single labeled transaction — one undo step.
Emits "style:changed".
relationship | string | Relationship type name to target. |
color | string | CSS color string to apply. |
Returns: Promise<void>
Example
await api.style.setRelationshipColor("KNOWS", "#911eb4");