Automatic Material You Colors Generator from your wallpaper for the Plasma Desktop
Project description
🎨 KDE Material You Colors
Automatically generate light/dark color themes for KDE (and pywal if installed) from your current wallpaper, using @T-Dynamos Python implementation of Google's Material Color Utilities
Features
Plasma specific
- Plasma Widget (Plasma 6 version)
- Support for all Wallpaper plugins (color, image, slideshows, animated, Plasma 5.26+ dark wallpaper variants)
- Update automatically on wallpaper change
- Change icon themes
- Start automatically on login
- Make titlebar darker to match specified applications like terminals, code editors and other programs themed by pywal
- Follow Plasma Material You Dark/Light change to work with theme schedulers like Koi
- Plasma addons
- Tint SierraBreeze window decoration buttons
- TitleBar opacity control for Klassy and SierraBreezeEnhanced window decorations
- ToolBar opacity control for Lightly Application style
- Tint Klassy window decoration outline
Themeable programs
- Konsole color scheme
- opacity control
- Pywal support to theme other programs using Material You Colors
- Basic KSyntaxHighlighting support (Kate, KWrite, KDevelop...)
Theming options
- Alternative Material You color selection if the wallpaper provides more than one
- Use your favorite color to generate Material You color schemes
- Custom colors list used for konsole/pywal
- Custom amount for colorfulness and brightness of theme
- Color scheme variants from Material You (Vibrant, Monochrome, Neutral...)
- Dark/light Color schemes (Plasma and pywal/konsole independently)
- Set a script that will be executed on start or wallpaper/dark/light/settings change
- Configuration file
Installing
-
Arch Linux AUR use your preferred AUR helper (e.g
yay -S kde-material-you-colors
) -
openSUSE Tumbleweed Install instructions
-
Fedora 40 and Fedora Rawhide Install instructions
Manual install
-
Install
pipx
system packages from your distribution packages. -
Install the backend
For Plasma 5 this is the last version, development has switched to plasma 6
pipx install kde-material-you-colors==1.7.1 pipx inject kde-material-you-colors pywal
For Plasma 6
pipx install kde-material-you-colors pipx inject kde-material-you-colors pywal # to upgrade to newer version pipx upgrade kde-material-you-colors
Note: You may need to install
gcc python-dbus-dev libglib2.0-dev
system packages or their equivalent for your distribution. Additionally, installing some libraries for Pillow may be necessary, see Pillow docs -
Install the widget from the KDE Store Plasma 6 version | Plasma 5 version
- Right click on the Panel > Add Widgets > Get New Widgets > Download New Plasma Widgets
- Search for "KDE Material You Colors", install & add it to your Panel/Desktop.
-
Install the screenshot helper. Optional but recommended if you use other than default Image wallpaper plugin
Plasma 6
Install
git extra-cmake-modules
system packages or their equivalent for your distribution.git clone https://github.com/luisbocanegra/kde-material-you-colors ./install-screenshot-helper.sh
Plasma 5
Install
git extra-cmake-modules
system packages or their equivalent for your distribution.git clone https://github.com/luisbocanegra/kde-material-you-colors -b plasma5 ./install-screenshot-helper.sh
To upgrade to a new version repeat these steps.
Note: When you upgrade te widget to a newer version it will inform you if it requires a new version of the backend.
Running
You can Start and change the configuration from the widget.
From terminal
kde-material-you-colors
Run kde-material-you-colors -h
to see the list of available options (Flags take precedence over configuration file)
Starting/Stopping Desktop entries
If not installed by your package manager, run kde-material-you-colors -cl
- To start the program launch KDE Material You Colors from your applications list
- To stop, launch Stop KDE Material You Colors from your applications list
Running on Startup
kde-material-you-colors -a
Removing from autostart
- Open System Settings > Autostart
- Remove kde-material-you-colors by clicking on the Trash button.
Configuration file
The preferred way to change the configuration is from the widget. If the configuration doesn't exist, it will be automatically created by the widget.
Editing manually
The default configuration file can be created by running kde-material-you-colors -c
the location is ~/.config/kde-material-you-colors/config.conf
Run kde-material-you-colors
with no arguments from terminal to test your changes in real time.
Due to Qt limitations, comments are removed from the configuration file by the widget. You can view the sample configuration file with comments here.
FAQ
Q. How does this different from Plasma's "Accent Color From Wallpaper" and "Tint all colors with accent color"?
There are some key differences:
- Brighter accent/buttons colors
- Option to choose another color if the wallpaper returns more than one
- Can also apply colors to Konsole and pywal (both from wallpaper and custom ones)
- Colors comparison https://imgur.com/a/a28uZka (kde-material-you-colors top, default tint option bottom)
Q. Why there are duplicated color schemes in System Settings
To update color with plasma-apply-colorscheme
(utility provided by KDE developers), the file containing the new color scheme must have a different name than the current one, to workaround that, this program creates two color scheme files with different names, then applies one after the other. As a result you end up with duplicated color schemes and maybe some lag while updating schemes.
Q. Can't get wallpaper colors of the default wallpaper
If you are using the default Image wallpaper plugin try changing the image to something else at least once first.
Q. Slideshow wallpaper (or any other Plugin) doesn't update colors correctly
Try enabling Only use screenshot method from the widget Advanced settings
Q. How does wallpaper detection work and why it fails sometimes?
The wallpaper is obtained in the following order:
- First, uses the Plasma Desktop Scripting API to read Wallpaper plugin configuration.
- If the previous fails, the screenshot helper (if installed) is used
The backend uses the KWin Scripting API and calls the screenshot helper to take a Screenshot of the Desktop view using the KWin's Screenshot plugin
Both methods are somewhat robust but there are edge cases when detection will fail, which are explained here
Bug reporting / Feature requests / Contributing
Please read the Contributing guidelines in this repository
Support the development
If you like the project you can:
Thank you ❤️
Acknowledgements
- @T-Dynamos Python Implementation of Material Color Utilities used by this project.
- @avanisubbiah Python Implementation of Material Color Utilities (used until v1.8.0).
- Material Color Utilities
- Pywal used to apply material colors to pywal supported software
- MaterialColorUtilities (C#) (used until v0.8.0).
- xdg-desktop-portal-kde base for desktop screenshot helper.
- kdotool base for getting desktop window id.
- Google LLC. / Pictogrammers for the widget icon assets.
- This comment on Reddit and ksetwallpaper for the code to get the current Wallpaper that served me as inspiration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kde_material_you_colors-1.9.3.tar.gz
.
File metadata
- Download URL: kde_material_you_colors-1.9.3.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6debc5a2964299cb94f766484a5b9060cdf9f741bbe90a4eff3abaac34467dcc |
|
MD5 | 7b5033f6a6a62fc85f5328bd5a9c444d |
|
BLAKE2b-256 | 1265a791f547820c841a0163d6a2842d1a3ee2efa8e12d1287ef47116bc26f22 |
File details
Details for the file kde_material_you_colors-1.9.3-py3-none-any.whl
.
File metadata
- Download URL: kde_material_you_colors-1.9.3-py3-none-any.whl
- Upload date:
- Size: 92.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f289a31a4b67b3e9c99752f19688b3d17277652194520e1ca61088b94a7d94 |
|
MD5 | 973d7a77238646630fe8a3328a0dfd07 |
|
BLAKE2b-256 | 212fd1bec5896e11601dfa6c1db4418287ee69850e402ecde570eac6ac2ae2a0 |