wolph / alfred-converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculator and Wolfram Alpha.
93 stars 15 forks source link

Light icons on dark themes? #13

Closed emroch closed 4 years ago

emroch commented 6 years ago

I'm not sure if this is even possible, but it would be nice if you could figure out what kind of theme is applied to the Alfred window and adjust the icons based on that. For instance, any background darker than 70% grey would use a white icon, while everything else uses black.

If this isn't possible, could there be a toggle in the workflow that adjusts the icon color?

wolph commented 6 years ago

It looks like it is possible using the alfred_theme_background: https://www.alfredapp.com/help/workflows/script-environment-variables/

Now the question when I'll have some time to arrange this... unfortunately I can't give any timeframe on that yet. I'll have to add/find a new set of icons and find out where/how to change the code to detect this.

emroch commented 6 years ago

Cool! If the icon set you have isn't restricted by any licensing agreement, I could work on creating some lighter ones for you.

As a side note, it may be possible to use the current icons as a mask to dynamically generate icons on the fly with whatever color you want, perhaps allowing a user-settable environment variable or just giving more flexibility for different backgrounds.

wolph commented 6 years ago

The images are definitely royalty free, I think I got them here: https://www.shareicon.net/pack/ios7-set-lined-1

It might have been a different site though, I remember browsing a site where I could specify license

wolph commented 4 years ago

This was recently fixed thanks to @liuzikai

https://github.com/WoLpH/alfred-converter/pull/17