Color schemes #817
TiZ-HugLife
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Correct. Anyone is free to fork Kvantum and experiment with these ideas. But Kvantum will never be compatible with the elementary concept of "color scheme". |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, the topic of color schemes, as supported by Plasma, has come up over and over in the issue tracker, and the issues have always been summarily closed with little discussion. As there is a discussion forum now, and with a few advents that have expanded color customization in some other parts of the FOSS ecosystem, I would like to attempt opening a discussion on color schemes.
You have repeatedly stated that the reason color schemes aren't supported is because of SVG having more complex concepts, like gradients, that don't map cleanly from Plasma color schemes. I think this comes from a perceived expectation from users that they should be able to apply a Plasma color scheme to any Kvantum theme. I think that would be very unreasonable to support, but I think it would be reasonable to expose this capability to any theme author that does want to support it. Most Kvantum themes out in the wild are only using flat colors and are good candidates for supporting Plasma color schemes should the author wish to.
If this is something you--or someone who would want to make a PR or fork for it--would want to do, what would be the best approach? SVG does seem to support CSS color variables; how about adding additional CSS when loading the SVG that sets color variables for each defined color in the Plasma color scheme? It might look something like this:
The theme author could then use something like
var(--plasma-button-background-normal, rgb(24, 24, 24))
throughout the SVG in places that they would want to be recolorable by the Plasma color scheme, with the second parameter providing a fallback for situations where no color scheme is available. Themes that don't want to let users customize the colors would still work just fine, but now it would be possible to make themes that could be color customized. Plasma does have particular support for the concept of accent colors; a theme author could opt to support only accent colors for their theme.Are there different approaches you would prefer? It would technically be possible to recolor a Kvantum theme in the current day via preprocessing a SVG file with variable substitutions, but to make that smooth, you would probably want hot reloading to exist in some form. I don't disagree with that thread's conclusion that filesystem watchers could be expensive, but perhaps watching for a DBus signal or something like that to reload the SVG on-demand rather than automatically would be sufficient.
Beta Was this translation helpful? Give feedback.
All reactions