obsidian-3d-graph icon indicating copy to clipboard operation
obsidian-3d-graph copied to clipboard

Dark mode not available?

Open perigozin opened this issue 1 year ago • 1 comments

Is it me or the extension doesn't detect when using a dark theme? I don't know if it's made to be this way but the contrast looks really bad. Wish the nodes were brighter, like in the default graph.

Untitled

perigozin avatar Apr 19 '23 12:04 perigozin

This appears to be part of a broader issue with pulling colors from the current theme. I've observed this behavior using the native and Minimal themes.

Currently, src/util/ObsidianTheme.ts attempts to extract colors from the CSS theme using the getComputedStyle function, which should theoretically resolve any arithmetic inside CSS calc() expressions.

However, getComputedStyle is failing to do so for some reason, so it is returning strings like hsl(calc(195 - 3), 100, 23). ForceGraph has no idea how to compute these calc expressions, so it defaults to rendering these colors as black.

massivebird avatar Oct 28 '23 21:10 massivebird