The default scheme isn't very bright and dots has different schemes that can be set when making graphs from the command-line. Doxygen exposes DOT_FONTNAME to pass a font argument to dots but doesn't seem to have that for the color scheme? Does anyone know if there is a custom tag to set that, or a way to set a default scheme on GraphViz?
Asked
Active
Viewed 527 times
0
-
Which version of doxygen are you using? I assume you are talking about the diagrams like call graph, inheritance diagram etc. There is, to the best of my knowledge, no change of color scheme setting available. – albert May 16 '22 at 07:52
-
I'm using 1.9.4. Yes, that's what I was thinking of. Ok, good to know, thanks! – Seth Climenhaga May 16 '22 at 16:34
1 Answers
1
You can use the Brewer colour schemes to define a "palette" of colours from which you can choose one with an index (1, 2, 3, ...).
When you want to change the palette, you just have to change the default colour scheme for nodes (or edge, or graph), the actual display colour of all nodes in the graph will then be updated accordingly.
This example uses colour scheme set39
:
digraph {
node [colorscheme=set39];
node [shape=rectangle, style="filled", fillcolor=1]
a
node [shape=ellipse, style="filled", fillcolor=4]
b
a -> b
}
By changing only the colorscheme
property of the first node element (the "default"), you can change the colour of all nodes:
digraph {
node [colorscheme=spectral10];
node [shape=rectangle, style="filled", fillcolor=1]
a
node [shape=ellipse, style="filled", fillcolor=4]
b
a -> b
}

Saaru Lindestøkke
- 2,067
- 1
- 25
- 51
-
How is this related to doxygen? This is a pure dot / graphviz solution based on the available dot files, with doxygen these dot files are generated so the user has no / less influence in manipulating them. – albert May 23 '22 at 14:45
-
1The last sentence of the Q is: "or a way to set a default scheme on GraphViz?" I'm answering that part. – Saaru Lindestøkke May 23 '22 at 14:53