type: color | colorList, default: black

Basic drawing color for graphics, not text. For the latter, use the fontcolor attribute.

For edges, the value can either be a single color or a colorList.

In the latter case, if colorList has no fractions, the edge is drawn using parallel splines or lines, one for each color in the list, in the order given.

The head arrow, if any, is drawn using the first color in the list, and the tail arrow, if any, the second color. This supports the common case of drawing opposing edges, but using parallel splines instead of separately routed multiedges.

If any fraction is used, the colors are drawn in series, with each color being given roughly its specified fraction of the edge.

For example, the graph:

Edge Color Example
digraph G {
  a -> b [dir=both color="red:blue"]
  c -> d [dir=none color="green:red;0.25:blue"]


Subgraph & Node Color Example
digraph G {
  subgraph cluster_yellow {
    a [color="red"]
    b [color="green"]

See also:

Valid on:
  • Clusters
  • Edges
  • Nodes
Last modified July 2, 2021 : Add 'see other' to color (eee6b90)