Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode not available? #24

Open
perigozin opened this issue Apr 19, 2023 · 1 comment
Open

Dark mode not available? #24

perigozin opened this issue Apr 19, 2023 · 1 comment

Comments

@perigozin
Copy link

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

@massivebird
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants