Jump to content
funtoo forums
Sign in to follow this  

Change colors in gtk+ theme based on wallpaper

Recommended Posts

A few weeks ago I read a post on some forum (I think the Arch Forums) that documented a piece of Python code that "selected" the color in a desktop wallpaper that was the most common in the wallpaper (or something to that effect) and incorporated that color into a gtk+ theme. This sort of behavior is similar to the taskbar and window borders in Windoge 8+ being colored based on the wallpaper currently set. I have lost the link and could not find it again in my brief ten minute searching of Google. I was wondering if anyone on here knows what I am talking about and could direct me to a page where I can learn more about this?



-- Duncan

Share this post

Link to post
Share on other sites

Life is too short for ugly desktops!

I'm with you Duncan, and I really love that cityscape you have in the desktops thread.

1st, I don't know of that which you ask.  Although I'm sure there is an easy way to find the predominant color in your picture in Gimp or something I don't know that either.  But it seems to me you can probably come close with just your eyeballs.

I imagine you have looked over Gnome Look and those sorts of collections for themes.

I use Emerald rather than GTK and it has the Emerald Theme Manager that allows you to set the colors, for one thing (many other options too).  Although it appears to me that Emerald is a (now) forgotten step-child of GTK I'm not aware of any such thing for GTK.  So I just find an Emerald theme at Gnome Look that's close enough then modify it.

Your question peaked my interest and I did find something that may be interesting though:


Sounds like it may do what you want, sans the color picker.  Much like the Emerald Theme Manager.

I hope someone else can chime in with some better ideas.


Edit: This will find your predominant color

Share this post

Link to post
Share on other sites

The first is 'wal'. The usage is like

# wal -i Pictures/Wallpaper/kde.png




Or something like 'pywal' https://github.com/dylanaraps/pywal


The second is 'themer'. "Generate a theme from a wallpaper:"

$ themer generate themename wallpaper.png


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...