Is there a way to add color to only a field in a record-based node. Like in the following example, can the field struct2:f0 alone be in different color?
digr
I don't think this is possible.
You may consider using HTML-like labels - you should be able to do everything you can do with record-based nodes, and more.
From the above linked documentation page:
The record-based shape has largely been superseded and greatly generalized by HTML-like labels. That is, instead of using
shape=record
, one might consider usingshape=none
and an HTML-like label.
and
Although HTML labels are not, strictly speaking, a shape, they can be viewed as a generalization of the record shapes described above. In particular, if a node has set its shape attribute to
none
orplaintext
, the HTML label will be the node's shape.
Try this:
digraph G {
"Record" [ label=<<table>
<tr>
<td>A</td>
<td bgcolor='#00CC11'>B</td>
</tr>
</table>
>
];
}