color attribute
The color
attribute only affects the color of the border around the node, not the color of the label within the node:
digraph {
node [ shape = box ]
red [ color = red ]
blue [ color = blue ]
green [ color = green ]
none [ ]
}
In order to modify the color of the lable, the fontcolor
attribute must be used.
Filled nodes
In order to produce a node that is filled with a (background-)color, it needs to have the two
attributes
digraph X {
node [ shape = box ]
node_1 [ fillcolor=bisque style=filled label="style=filled and fillcolor" ]
node_2 [ bgcolor=red style=filled label="style=filled and bgcolor" ] // bgcolor is not respected, color will be grey
node_3 [ fillcolor=bisque label="no style but fillcolor" ]
node_4 [ bgcolor=red label="no style but bgcolor" ]
node_1 -> node_2 -> node_3 -> node_4 [ style=invis ]
}