jothepro / doxygen-awesome-css

Custom CSS theme for doxygen html-documentation with lots of customization parameters.
https://jothepro.github.io/doxygen-awesome-css/
MIT License
1.05k stars 118 forks source link

dot graph : SVG not transparent #112

Open JosueGauthier opened 1 year ago

JosueGauthier commented 1 year ago

Hello, I have the following problem with generating a svg dot graph: Screenshot from 2023-05-02 18-21-07

As you can see the dot graph is not transparent (ok it's weak but the 2 hexa colors are : #222222 for dot graph and #222224 for background), I try the solution : DOT_TRANSPARENT = YES but with new doxygen version it's a native feature.

I can change the css but if you have any solutions ?

Thanks,

jothepro commented 1 year ago

Afaik DOT_TRANSPARENT does only make the background of the diagram transparent, the boxes may be filled with different colors depending on the semantic meaning.

As you can see in the legend, the boxes may also be red or light gray.

Doxygen legend

Originally the generated diagrams have black contours and white background. In dark mode, doxygen-awesome applies a filter to all diagrams to make them match the dark background:

filter: brightness(89%) hue-rotate(180deg) invert();

In theory there is a fix to your problem by fine-tuning the magic numbers of this filter, in the lines L962 and L974 in doxygen-awesome.css. I tried for a while but couldn't really find the perfect values.

If you find better values or you are able to do the math to calculate what values are needed for brightness() and hue-rotate() to match the background-color, pls let me know! :)

LDprg commented 8 months ago

@jothepro Maybe this website could help out fixing the colors: Hex color to CSS filter