New Dark Mode #4713
davidjgraph
started this conversation in
General
New Dark Mode
#4713
Replies: 1 comment 8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Specify separate colors for light and dark mode by selecting User-defined in the Advanced section of the color dialog.
Setting Colors for Light and Dark Mode
Note: The Advanced section remains hidden in light mode if only one color is specified. To access this section, click on Advanced.
Dark Mode Functionality
The new dark mode utilizes the
light-dark()
color function in cell styles and HTML labels:light-dark()
color function.Adaptive Colors for Diagrams in Dark Mode
The Adaptive Colors feature allows you to adjust the appearance of your diagrams in dark mode. This option is available in two locations: the Style tab and the Extras menu, providing easy access to customize how colors are managed.
Adaptive Colors Modes
defaultAdaptiveColors
configuration. Possible values areauto
,simple
andnone
. Note that this is the default setting for all diagrams and means that the diagram appearance may change based on the current system default.Accessing the Adaptive Colors Menu
Removing User-defined Colors
To remove user-defined dark colors that override the automatic colors in
simple
adaptive colors mode, open the Adaptive Colors dialog by pressing Ctrl+Shift+6.This feature helps in achieving a uniform appearance for all cells and labels regardless of the mode.
Export SVG with Dark Mode
Light and dark colors are specified using the
light-dark()
color function and the SVG element has acolor-scheme: light dark
CSS property to use the current color scheme. (Where possible, light colors are specified in the DOM as a fallback for browsers that do not support thelight-dark()
color function.) This means the static SVG adapts to the color scheme of the operating system, containing page, node or img tag. See diagrams.net Dark Mode in SVG with CSS for details.Comparison of the new (left) and old (right) SVG export:
Minimum Browser Requirements
Due to the use of the
light-dark()
CSS color function, the minimum browser requirement for this new dark mode is Chrome 123+, Firefox 120+, Safari 17.5+, Opera 109+, WebView Android 131+, Safari iOS 17.5+ and Edge 123+. Where possible, a fallback for older browsers was implemented.See also
Beta Was this translation helpful? Give feedback.
All reactions