As you may know, GIMP provides official Linux packages through Flatpak and AppImage. The Flatpak package however does NOT automatically switch app color to light or dark depends on system color scheme.
That’s because Flatpak is running in sandbox environment. The sandbox isolation enhances security and makes easy to distribute newer software releases without worrying about dependency issue. However, it has limited access to host resources causing issues, including theming.
To workaround the issue, xdg-desktop-portal was created as a portal to allow Flatpak apps to securely access resources from outside sandbox. And, the portal has started exposing a color-scheme
property in the latest versions.
GIMP has merged the request to respect system color scheme preference on Linux. So, it will finally automatically switch between light and dark accordingly in v3.1.2, the development release for next major 3.2. Not only for Linux, it will also implement the feature for Windows users.
How to Make GIMP 3.0.x Follow System Color Scheme
For current GIMP 3.0.x, besides using AppImage or native .deb
/.rpm
packages, there’s an extension that can do the job to automatically change app color scheme to light or dark accordingly.
NOTE 1: GIMP Flatpak in Manjaro Linux respects system color theme out-of-box as it has the extension pre-installed!
NOTE 2: This tutorial is for GNOME desktop only, so far from v42 to 48.
Step 1: Install the GTK3 Theme & Dark Variant
As Flatpak runs in sandbox, you also need to install the GTK3 theme and its dark variant as Flatpak package.
For Ubuntu with default Yaru themes, open terminal (Ctrl+Alt+T) and run commands below one by one:
- Install Yaru Gtk3 theme as flatpak:
flatpak install org.gtk.Gtk3theme.Yaru
- And, install its dark variant:
flatpak install org.gtk.Gtk3theme.Yaru-dark
- Yaru has many variants with different accent colors. You may run the command below to list them all:
flatpak search --columns=application:f org.gtk.Gtk3theme.Yaru
Then, install them one by one. For example, install the Yaru theme with
sage
accent color (both light and dark):flatpak install org.gtk.Gtk3theme.Yaru-sage org.gtk.Gtk3theme.Yaru-sage-dark
To make things simple, run the command below to install all Yaru themes & variants:
for i in $(flatpak search --columns=application:f org.gtk.Gtk3theme.Yaru); do flatpak install $i -y; done
For other GNOME based Linux with default Adwaita theme, it’s recommended to install the GTK3 port: adw-gtk3.
First, go to the link below and download adw-gtk3
source tarball (e.g., adw-gtk3v6.2.tar.xz):
Then, decompress it and move the adw-gtk3 and adw-gtk3-dark into .local/share/themes
directory. NOTE: .local
is hidden by default, press Ctrl+H to view. And, create themes sub-folder if it does not exist under .local/share
directory.
After installed the theme for native apps, also run the command below to install them for Flatpak apps:
flatpak install org.gtk.Gtk3theme.adw-gtk3 org.gtk.Gtk3theme.adw-gtk3-dark
Step 2: Apply the GTK3 Theme for Legacy Applications
Ubuntu by default uses Yaru theme for legacy GTK3 applications, you may make a change of accent color in Settings to ensure.
For other Linux with GNOME, search for and install Gnome Tweaks from Gnome Software app. Then, launch it and choose “Adw-gtk3” or “Adw-gtk3-dark” for legacy applications (according system color scheme) under Appearance setting panel.
Step 3: Install GNOME Extension
For GNOME from version 42 to 48, there’s an extension called Legacy (GTK3) Theme Scheme Auto Switcher that can automatically switch color scheme for GTK3 apps.
Ubuntu user may first search & install Extension Manager (filter by Debian package) in either Ubuntu Software or App Center. Then launch the tool and search install the extension under Browse tab.
Without using Extension Manager, you may visit the extension on EGO, then use the ON/OFF switch to install it:
You need to install the browser extension (if it asks) and refresh the page. And, for Debian/Ubuntu, run the command below in terminal (Ctrl+Alt+T) to install the agent package first:
sudo apt install chrome-gnome-shell
Step 4: Apply Change
After installed & applied the GTK3 theme and its variant, and installed the extension, you may now start or re-start GIMP Flatpak app to see the magic.