From 7913477235a6ecf4b1cb22a1399ca756ee1edf2f Mon Sep 17 00:00:00 2001 From: eylles Date: Wed, 11 Mar 2026 19:14:16 -0600 Subject: [PATCH 1/2] Fix foxify_color for very dark colors When passed a color like #000000 foxify_color used to output the same color with this change the minimum values for every rgb component are capped at 10 so we'll always get a lighter color even with #000000 as input. --- pywal/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pywal/util.py b/pywal/util.py index 83a1ef3..4137971 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -318,6 +318,9 @@ def foxify_color(color, f): """pywalfox algorithm to lighten colors""" pwf = float(f) c = hex_to_rgb(color) + c[0] = max(c[0], 10) + c[1] = max(c[1], 10) + c[2] = max(c[2], 10) b = [] b.append(min((max(0, int(c[0] + (c[0] * pwf)))), 255)) b.append(min((max(0, int(c[1] + (c[1] * pwf)))), 255)) From db7861ec7f9b0147185f94965a46ad278a10c125 Mon Sep 17 00:00:00 2001 From: eylles Date: Wed, 11 Mar 2026 19:26:47 -0600 Subject: [PATCH 2/2] Fix the dumb fix Hopefully with this no one will notice i pushed an untested commit to a onto a pull request being too sure of myself and thinking it was going to work... --- pywal/util.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pywal/util.py b/pywal/util.py index 4137971..98c3cfd 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -318,13 +318,14 @@ def foxify_color(color, f): """pywalfox algorithm to lighten colors""" pwf = float(f) c = hex_to_rgb(color) - c[0] = max(c[0], 10) - c[1] = max(c[1], 10) - c[2] = max(c[2], 10) - b = [] - b.append(min((max(0, int(c[0] + (c[0] * pwf)))), 255)) - b.append(min((max(0, int(c[1] + (c[1] * pwf)))), 255)) - b.append(min((max(0, int(c[2] + (c[2] * pwf)))), 255)) + b = [ + max(c[0], 10), + max(c[1], 10), + max(c[2], 10) + ] + b[0] = (min((max(0, int(b[0] + (b[0] * pwf)))), 255)) + b[1] = (min((max(0, int(b[1] + (b[1] * pwf)))), 255)) + b[2] = (min((max(0, int(b[2] + (b[2] * pwf)))), 255)) return rgb_to_hex(b)