Org-roam: Graph in dark mode

Created on 3 May 2020  路  4Comments  路  Source: org-roam/org-roam

Brief Abstract

Implement a dark mode for the graph.

Long Description

I like consistency between colors. When I have a dark Emacs I'd like to have a dark graph as well.
If it was able to adapt to the current color-scheme that'd be more soothing for my eyes.

This is not particularly critical though, more of a nice touch.

Proposed Implementation (if any)

Seems like there's a chunk of color-codes in the graph.el file, I guess changing them in some way is the proposed solution. Maybe the colors for the chosen color scheme is stored somewhere and is available through some variable, I'm not sure.

enhancement graph

All 4 comments

I agree we could definitely do more in terms of customizing the appearance of the graph.
Implementing #494 would be a step in this direction as it would allow us to separate the graphviz backend into its own module which would implement its own graph-building functionality.

I'd have to look into the dot language more, but it would make sense to allow a custom preamble to be inserted similar to Org's #+HTML_HEAD and #+HTML_HEAD_EXTRA.
The remaining ...-extra-config options could be consolidated into a plist or something more coherent as well. A rough sketch:

(setq org-roam-graphviz-options
      '(:edge (:title-length 100
               :dir "back"
               :citation (:title-length 50
                          :dir "back"))
        :config (:rankdir "LR")))

I like the idea of choosing colors based on the current Emacs theme as well.
By addressing this in a generic way, we can allow users to customize the appearance of the graph to their liking.

I like the idea of choosing colors based on the current Emacs theme as well.
By addressing this in a generic way, we can allow users to customize the appearance of the graph to their liking.

I agree. pdf-view does something similar with its midnight-mode, and it is pretty effective.

This is probably something @goktug97 can consider for org-roam-server?

This is probably something @goktug97 can consider for org-roam-server?

Awesome idea

https://github.com/org-roam/org-roam-server/commit/591f5d531c4afa163beb974f5398fda83e295666
Dark mode is added

NOTE: I've tried to prevent flickering in dark mode on iframes as best as I can but preview iframes still flicker time to time. Though I think people don't navigate in those frames regularly so it won't be a problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jethrokuan picture jethrokuan  路  3Comments

nmartin84 picture nmartin84  路  5Comments

rasendubi picture rasendubi  路  3Comments

kadircancetin picture kadircancetin  路  5Comments

Trevoke picture Trevoke  路  6Comments