#Pikchr (pikchr.org) is a great little piece of software from the SQLite folks. It parses a little language for describing diagrams with boxes and lines and things, and puts out SVG.
#OrgMode (orgmode.org) has, among many other things, a way you can make code notebooks, #OrgBabel. Like #Jupyter, but less webby, and inside #Emacs, and supporting many languages - even multiple in the same document - thence its name.
Thanks to the ob-pikchr package by @SReyCoyrehourcq, Pikchr is one of the languages you can just write in the middle of your document this way.
Pikchr supports #darkmode, and I've just made a pull request that gets ob-pikchr in on the dark-mode game.
https://github.com/reyman/ob-pikchr/pull/1
Many thanks to Sebastien for the help ob-pikchr has provided in diagramming my thoughts! You go use it too!