Reputation: 45
I am trying to highlight a specific word/words in a GraphViz label. I know how to change the font color for individual text, but I can't figure out how to change the text background color instead. So, for example here, I would like to have this label with just the word "love" with a red background. Is this possible?
digraph G {
"A" -> "B" [label=<This is my label <br/> It has line breaks. I<FONT COLOR="Red">love</FONT> background<br/>Colors.>]
}
Is this possible?
Upvotes: 2
Views: 1552
Reputation: 6763
It requires creating an HTML table with one cell with desired background color.
digraph G {
"A" -> "B" [label=<This is my label <br/> It has line breaks. I <FONT COLOR="Red">love</FONT> background<br/>Colors.>]
C [label=<<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
<TR><TD COLSPAN="3">This is my label </TD></TR>
<TR><TD>It has line breaks. I </TD><TD BGCOLOR="red">love</TD><TD>background</TD></TR>
<TR><TD COLSPAN="3">Colors</TD></TR>
</TABLE>>]
}
Upvotes: 4