-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Much darker background colors with pywal16 comapred to python-pywal arch package #31
Comments
Just throwing that here, I didn't check anything. But the goal of pywal16 is to have a wider range of colors, the backgroundColor in the original pywal is likely closer to color8 of pywal16 rather than color0. I'd say the solution for you if you want a lighter background color is to tap in color8 instead of backgroundColor? Otherwise it would simply turn the issue around for people that want a darker background color I think? Although I get the issue of not being very iso with pywal, but I'm not sure that is the goal of the project. |
This how color 8 looks like Here is the template i use as well in case it's needed
|
Maybe color generation could need some rework, but seeing that a partial or maybe full rewrite of the program is probably on the way. I'd say it can wait until then. |
yep i have noticed that too. |
@eylles is the background dark color is intentional? |
hmmm i barely changed anything about how colors are generated and adjusted, tho i think when sonjiku made the original pr he did make color[0] quite darker. welp i guess it happened either here: e504c55 or here: 42efe31 hmmm interesting, the only change is with the wal backend that is now generating a darker bg color. these are the values i get
tagging @BEST8OY since he also reported this. welp i'll simply modify the wal backend to output a lighter color before it gets darkened by the generic adjust function, unless someone does want to also have the darker bg from wal as an option. |
looking forward for the fix commit. |
still not the way I expect it to be! |
Would you mind sharing your wallpaper so i can use it to check the color values first hand? |
I don't have the wallpaper used by @BEST8OY but the wallpaper i used for above is in the above preview you can see that colors of nautilus are quite darker (better than before but still a bit darker) using |
Thanks, will check and try to figure out where in the code the color 0 shades differ |
thanks, will have to use the 3 images to check exactly what is going on, haven't had much time to check and fix this since last friday catched a sprained ankle and got 2 things that i need to tend before going back to this. |
@eylles is this done for only |
so about work on this i got a test diff with 3 prints, first is the raw output from imagemagick with garbage values and all, second is the dict of colors before the adjust function and third is after the adjust function. diff --git a/pywal/backends/wal.py b/pywal/backends/wal.py
index 77f51c7..ea9fe52 100644
--- a/pywal/backends/wal.py
+++ b/pywal/backends/wal.py
@@ -20,6 +20,7 @@ def imagemagick(color_count, img, magick_command):
try:
output = subprocess.check_output([*magick_command, img, *flags],
stderr=subprocess.STDOUT).splitlines()
+ print(output)
except subprocess.CalledProcessError as Err:
logging.error("Imagemagick error: %s", Err)
logging.error(
@@ -79,4 +80,7 @@ def get(img, light=False, cols16=False):
garbage = "# Image"
if garbage in colors:
colors.remove(garbage)
- return adjust(colors, light, cols16)
+ print(colors)
+ result = adjust(colors, light, cols16)
+ print(result)
+ return result now i just need to apply something similar to legacy pywal, got a clone of the og repo and the latest release tag checked, will return in a while with the diff and some tests to try and gather where exactly do the colors differ and perhaps why and for how much. |
you mean in pywal16 3.5.3 or in pywal 3.3.0 ? cuz previos versions of pywal16 would produce a darker bg color right now the generic adjust function checks if the first element of the color[0] (bg) is "0" and if it isn't it will darken the color by 40% Lines 67 to 129 in a5ebec0
that 40% was the adjust from legacy pywal to the bg color of the wal backend: Lines 57 to 81 in 984c7b6
however not every backend takes nicely to using the new 40% darken of the background as many backends such as: pywal16/pywal/backends/schemer2.py Line 24 in 984c7b6
haishoku: pywal16/pywal/backends/haishoku.py Lines 25 to 31 in 984c7b6
colorz: pywal16/pywal/backends/colorz.py Line 31 in 984c7b6
expect the old adjust function that would darken their background by 80% Lines 55 to 73 in 984c7b6
for colorthief i added a pre-adjust to try and match the old adjust that it had and darken the bg color by 80% pywal16/pywal/backends/colorthief.py Lines 40 to 48 in a5ebec0
colorthief legacy: pywal16/pywal/backends/colorthief.py Lines 39 to 58 in 984c7b6
so my problem right now is not so easy as i have to add a way for backends to do see the 80% darkening of the bg but wal only get the bg darken by 40% and also figure out why even now it does produce a darker bg color with some images. |
i am currently having |
been testing image by image also checking with a pair of my own, been cobbling a huge detailed post with tables, i got a final for CS61C (well, the cs61c variant at my university) tomorrow so i may be able to post the results of testing on wednesday. |
Just in case, I'm getting this with wal backend on arch with latest updates.
|
Thanks @BEST8OY please follow the instructions on #48 (comment) and report back there. |
okay, so pywal16 and pywal legacy both with the same debug print. pywal: https://github.com/eylles/pywal/tree/test-cols pywal16: https://github.com/eylles/pywal16/tree/test-cols so to compare apples to apples both debug prints are a commit after the release that is currently on pypi. (not really right now as the pywal16 branch was based on 3.5.3) so let's see, first wiht my current wallaper pywal: data from ImageMagick: pre-adjust: post-adjust: pywal16: data from ImageMagick: pre-adjust: post-adjust: the wallaper i was using before pywal data from ImageMagick: pre-adjust: post-adjust: pywal16: data from ImageMagick: pre-adjust: post-adjust: pywal: data from ImageMagick: pre-adjust: post-adjust: pywal16: data from ImageMagick: pre-adjust: post-adjust: as for niksignh710's images i got them as pngs both are huge, the leaves one is 7.6MB while the other is 27MB niksignh710's leaves wallpaper pywal: data from ImageMagick: pre-adjust: post-adjust: pywal16: data from ImageMagick: pre-adjust: post-adjust: niksignh710's abstract wallpaper pywal: data from ImageMagick: pre-adjust: post-adjust: pywal16: data from ImageMagick: pre-adjust: post-adjust: across my tests the color0 came out the same, tho i did take care of running for that reason #57 was opened with the corresponding fixes as modifiying the generic adjust function to only darken the color 0 in 40% (to get old pywal behaviour) impacts the other backends that DO depend on the generic adjust giving them an 80% darkening of their color 0. |
I switched to your pywal fork and i noticed that background colors are almost pitch black compared to python-pywal i was using before
Is there any way to make pywal16 behave like python-pywal
(I used VSCode as a example but this apllies to anything that sues @backgroundColor including my waybar and rofi presets)
python-pywal package from arch repo
pywal16 installed with pipx
The text was updated successfully, but these errors were encountered: