Skip to content

Add support for setting the SVG adaptive color theme.#104

Open
jvdbroeck wants to merge 4 commits into
modelmat:mainfrom
jvdbroeck:svg-theme
Open

Add support for setting the SVG adaptive color theme.#104
jvdbroeck wants to merge 4 commits into
modelmat:mainfrom
jvdbroeck:svg-theme

Conversation

@jvdbroeck

@jvdbroeck jvdbroeck commented Jan 29, 2025

Copy link
Copy Markdown

This PR adds support for an optional configuration setting to set the adaptive coloring mode for SVG files.

Currently, the default value in draw.io is to have "auto"-matic adaptive coloring. This means that an SVG file will render with a different coloring scheme when the viewer has set his desktop theme to be "light" or "dark".

When set to "light" or "dark", the SVG file will always be redendered with "light" or "dark" color schemes, irrespectively of the desktop theme set by the viewer.

With the changes in this PR, users are able to:

  1. set a default, global value for the adaptive coloring mode in conf.py;
  2. set a specific value for the adaptive coloring mode on a per-image basis with the ":svg-theme:" tag.

The documentation in README.md is updated, and a new pytest test case was added as well.

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

Successfully merging this pull request may close these issues.

2 participants