![]() Registered Member ![]()
|
Hi there,
I would like to have a certain colour scheme be recognised as dark-themed by applications. In the system settings, when editing colour schemes, there is no option to make that distinction, so my thought was to edit the .colors file directly, in the hopes of finding a simple value anywhere that I could change to make the desired effect. My knowledge of editing .colors file is sadly insufficient for this purpose as it turned out and I didn't find any documentation about how these files are organised, but here is what I tried: In the [General] section I changed the value "ColorScheme" to "BreezeDark" (it had previously just been "Breeze"; compared the file to a native dark-themed .color file) Upon saving, logging out, logging in, it's still being recognised as a light theme. (rinse and repeat where I choose the "Install from File" option and completely import the theme again just to be sure that it's properly loaded, but no luck) After a few effortless attempts to find some documentation as to how these files are structured or read, in frustration, I made a copy of the theme and set all it's colour values to absolute black. Lo and behold, in the System settings menu, when filtering for dark themes, this modified copy would be regognised as dark theme; not the file from which I took the copy, though, leading me to suspect there seems to be a certain threshold at which point Plasma thinks a theme's color values are dark enough to count as dark. Is this assumption true? And is there a specific value that I can tweak to make it being being recognised as a dark theme? The point of this being so that applications whose themes are set to go "by system default" don't all have to be set manually. I'd be extremely grateful for some insight here. Here are the contents of my .colors file just for reference:
|
![]() Registered Member ![]()
|
If certain apps have a "dark theme" inbuilt, this has nothing to do with the overall color setting. If your aim is to run certain applications as dark whereas your overall color is set to a light theme, there are other ways to go about, like QT_STYLE_OVERRIDE. If they are gtk applications you'd need a env GTK_THEME override. In the screenshot, for example, the color scheme is some light one. The gtk application style is set to breeze, which will also use the light color scheme. BUT. The brave browser is set to use a specific gtk theme and the audacious player is set to use a specific kvantum theme. https://imgur.com/a/Jc0t83N
As far as I know, there are very very few qt apps which use breeze that have an inbuilt dark mode which will use the breeze dark version to begin with, let alone use a specific color scheme as the dark mode. Unless something has changed, I'd guess the very rare "dark mode" of an app would consist of editing the default breeze dark theme if you would want a custom one.
This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.
|
![]() Registered Member ![]()
|
I see, that's definitely something to read up upon, thanks for the nod in this direction. I am not sure it is really the solution I was looking (or hoping) for - I just edited a colour scheme and suddenly Firefox and Anki would laser my eyes with a light theme.
While searching the web, I found that running
returns a "1" when it's a dark theme and a "2" for a light theme (independently from the actual colours that are being used as I thought), so I assumed there must be a simple, specific value somewhere in some file correlating to this that could be changed (source: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/52) As someone who still is fairly new to Linux as a whole (not to mention all the possibilities to go in-depth further down the road) this problem seemed solvable, but now I feel like I understand absolutely nothing (which isn't your fault, you tried; and honestly thank you for that) |
![]() Registered Member ![]()
|
Okay, so, at least, as a silver lining - I finally got what I wanted (more or less), and I know exactly under which circumstances it's triggered:
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/colors/filterproxymodel.cpp#L108 The solution was simply to set the brightness value of the window background in the colour scheme to be 191 or less... It checks out with
(I might not be the brightest, but I can be persistent. Thanks again for the support, at least it made me dive into further research into the topic, so even though I don't feel like I've actually gotten any smarter, at least this won't bug me anymore) |
![]() Registered Member ![]()
|
I really have no idea why you go through this entire thing. It's like I said, Anki ( I installed it for the sake of it) is 1) a gtk app 2) does its own color scheme. As for firefox, in recent times Firefox hardly follows the system settings anymore. What you see is anki, set to its own dark theme, kronometer using a dark kvantum theme I made and firefox is done with firefox color, a custom color theme to match my dark theme (both kvantum as gtk). As you can see, the Anki dark theme doesn't match the dark color scheme one bit. With the latest changes in gnome apps with their libadwaita theming, it's increasingly difficult to launch certain gtk apps using Exec=env GTK_THEME=theme application as well.
But hey, if your solution works for you....https://imgur.com/a/AiTFflo
This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.
|
![]() Registered Member ![]()
|
Other browsers are pretty much the same. Chromium ones will use the gtk theme. If the gtk theme is set to breeze, they'll follow the overall color scheme. But if you don't want that, ( say you want to use an overall light color theme, but a dark one for your browser) your only option is to override it.https://imgur.com/a/XsxCknc
This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]