obsidian-graphviz icon indicating copy to clipboard operation
obsidian-graphviz copied to clipboard

[FR] Add support for rendering graphs with the native obsidian theme

Open tnichols217 opened this issue 1 year ago • 2 comments

It would be nice if you would pass the current obsidian theme (background color, text color, etc.) into graphviz so that the generated images will integrate nicely into obsidian.

I would be open to make a PR after familiarizing myself with the code if this is of interest

tnichols217 avatar Jan 26 '24 17:01 tnichols217

This will be quite complicated. CSS interpretation comes much later after using dot to generate a picture file. At that point, the colors are already made, so PNG output won't work.

But, maybe you could make the plugin emit a SVG document inline (instead of the current "IMG" tag!) inside the document, and there use normal CSS rules to style it. You will need a way to have this plugin amend the CSS styling on the document somehow too.

chadmiller-saq avatar May 19 '24 19:05 chadmiller-saq

I made a little progress in #25 . It makes the generated SVG refer to a non-existent CSS file. I don't have much interest in figuring out what and where that should go, or making the SVG primitives style to the colors.

chadmiller-saq avatar May 20 '24 14:05 chadmiller-saq