From 1e11d1e907e53218b0f01c1019bff84518584e24 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 10 Apr 2025 21:24:26 +1000 Subject: scheme: fix mixing --- scheme/autoadjust.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scheme/autoadjust.py') 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: -- cgit v1.2.3-freya