diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-10 21:24:26 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-10 21:24:26 +1000 |
| commit | 1e11d1e907e53218b0f01c1019bff84518584e24 (patch) | |
| tree | 7c2debbbceab896a81ba2879955eb7c5d09491ed /scheme/autoadjust.py | |
| parent | install: add spicetify (diff) | |
| download | caelestia-cli-1e11d1e907e53218b0f01c1019bff84518584e24.tar.gz caelestia-cli-1e11d1e907e53218b0f01c1019bff84518584e24.tar.bz2 caelestia-cli-1e11d1e907e53218b0f01c1019bff84518584e24.zip | |
scheme: fix mixing
Diffstat (limited to 'scheme/autoadjust.py')
| -rwxr-xr-x | scheme/autoadjust.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scheme/autoadjust.py b/scheme/autoadjust.py index 294c33f..dd007ab 100755 --- a/scheme/autoadjust.py +++ b/scheme/autoadjust.py @@ -99,9 +99,9 @@ def grayscale(hls: HLS, light: bool) -> HLS: def mix(a: HLS, b: HLS, w: float) -> HLS: - h1, l1, s1 = a - h2, l2, s2 = b - return h1 * (1 - w) + h2 * w, l1 * (1 - w) + l2 * w, s1 * (1 - w) + s2 * w + r1, g1, b1 = hls_to_rgb(*a) + r2, g2, b2 = hls_to_rgb(*b) + return rgb_to_hls(r1 * (1 - w) + r2 * w, g1 * (1 - w) + g2 * w, b1 * (1 - w) + b2 * w) def darken(colour: HLS, amount: float) -> HLS: |