Bug 124966 - svg icon theme color scheme support
Summary: svg icon theme color scheme support
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Whiteboard: target:6.3.0
Depends on:
Blocks: Icon-Themes-Code-SVG
  Show dependency treegraph
Reported: 2019-04-25 20:53 UTC by andreas_k
Modified: 2022-04-25 14:01 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description andreas_k 2019-04-25 20:53:15 UTC
When svg icons can be used in LibreOffice it would be awesome to add color scheme support which is very simple, cause you only have to replace before the svg2png export font hex numbers.

To know which colors has to be changed I add to the svg icon themes an subfolder with color scheme where there is an standard text file and an dark text file. in the text file there is the origin color which will be replaced with the second color.
Comment 1 andreas_k 2019-04-25 20:57:22 UTC
e.g. the colibre icon theme use the mso color scheme. it will be really easy to use instead of the mso color scheme an enterprise cooperate design color scheme.

simple and powerful. Only the svg2png exporter had to be fixed first.
Comment 2 Thomas Lendo 2019-04-25 22:54:07 UTC
Sounds nice. Set to enhancement and new.
Comment 3 Commit Notification 2019-04-26 07:23:26 UTC
andreas kainz committed a patch related to this issue.
It has been pushed to "master":


tdf#124966 Icon theme initial color scheme support

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 4 Michael Meeks 2019-04-26 07:56:28 UTC
I would love to do that on load/read time for rendering the actual SVGs, and perhaps integrate this into the layering system for building themes so it is possible to make a high-contrast theme at run-time with a few new icons in a top layer, and then say colibre underneath with some generic color re-writing.

Andreas - do you need help here ? and/or I assume these are stub color changes rather than complete ones for eg. a dark theme we need to do more than map a single color (?)

Quikee - something to look at here I think.
Comment 5 andreas_k 2019-04-26 08:35:51 UTC

I am done. In each icon theme folder there is now an color scheme folder with standard and dark. The scheme is per icon theme. For dark theme there need to be replaced most of the time only a few colors. So the text files are really simple, but can be extended to replace more than one color.

I use the color replacement for the png export so it will work.

Hopefully the svg2png export will be better.
Comment 6 andreas_k 2019-04-26 08:46:33 UTC
dark theme support mean

- open color scheme/dark
- replace first color with second color in file line after line

with this simple svg replacement you can do dark theme support or any other color scheme support.

after that

- render png files

In configure -> View -> icon theme there need to be a second drop down menu for color scheme (which is icon theme related).

extension support and have fun