-
Notifications
You must be signed in to change notification settings - Fork 428
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 and Font colors #217
Comments
The extension always uses the light theme to export diagrams to svg! I don't think it is easily possible to create colored transparent svg documents that look great on light and dark themes at the same time. I think you can set a background color or set explicit colors that are theme-independent. |
For me it would be better to the embedded drawio aways be in light theme. |
I wanted to report this issue myself - saw it is already logged here. How do we setup so that what we see is what we get? The default text color as well as default line color show one thing while editing and another when saving as PNG / rendering in markdown. How can we get these to match each other without having to manually select a different color for each piece of line or text? |
I think if you use a light theme, they match up. |
Well most users are now using dark theme for all UI. I am guessing most of us who use dark mode exclusively on all our tools would prefer to use the same in VScode as well. Any reason this tool cannot have WYSIWYG while user is in dark mode? From a UX perspective that would be the default expected behavior -- render to PNG exactly what is shown while editing the diagram. Currently i am doing trial and error switching back and forth between edit and rendered PNG to correct default colors that surprise me in PNG output. Thanks for wonderful tool. I just started using this and find it extremely useful - think I am going to use it extensively in future, and hoping to get it setup for best workflow and productivity. |
I think this is a general problem of Draw.io (that I am not the author of). There is also Draw.io Desktop, if it works better for Dark mode, I can see what I can do to support it in VS Code. |
Ah okay -- thanks for that insight. Didnt know it was an issue with the parent tool itself. i understand the limitation in that case. Appreciate your response. |
We're using the extension to create We had the same problem too, that the editor is cool by supporting a dark vscode theme, but the rendering breaks down when included on rendered markdown (html) pages. White text on white backgrounds, blank lines on dark backgrounds, those kind of things. I have solved this by
rect:not([stroke="none"]) {
/* show rect having white border */
stroke:rgb(255, 255, 255) !important;
/* render all backgrounds completely transparent */
fill-opacity: 0;
}
svg div {
color: rgb(255, 255, 255) !important;
}
path {
stroke: rgb(255, 255, 255) !important;
} |
Hi all Thanks from me as well for the great work with this tool! Very useful vs code extension. I found issues as well with the dark theme (which I use by default for vs code). However, just figured out that I can simply change the extension's theme by setting:
This will render the extension on a white background, which then goes better with the GitHub Readmes or Markdown Viewers or the like. This "workaround" is good enough for me by far. I'm not too fussed about draw.io editor being in dark mode. Cheers Ben |
This still produces a PNG export that appears to be in Dark Mode... The extension is set to "atlas" and the Workbench is set to "Light (Visual Studio)".. MacOS is in Dark Mode |
Any news about this issue ? It seems that, at least to export PNG files, the extension should work since this fix : jgraph/drawio#1590 but I cannot find the export options. But it would be nice if we could have |
the only simple way to do that is assign each line / text color once again. |
To export a diagram with non transparent background, simply click anywhere on the page and check "Background Color" as demonstrated here: In dark mode the markdown will look like this: This works for both SVG & PNG. However it might not work well if you use a dark drawio theme, so you might switch to a light theme as described here: #217 (comment) |
Hi,
I don't think it's an issue, but i am not sure whats the proper configuration to handle this case.
So I have the vscode and the extension running in dark mode, and I created a diagram as below:
The problem is whenever I embedded it to a markdown file. It look like this, with the code

:Not sure how to set this right?
The text was updated successfully, but these errors were encountered: