From 53170f3ad0bd12d937e7bfb8e70c7825fec0a6b7 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 29 Mar 2025 12:04:35 +1100 Subject: scheme: better dynamic monochrome --- scheme/autoadjust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scheme/autoadjust.py b/scheme/autoadjust.py index 9c7ea9f..10e65c2 100755 --- a/scheme/autoadjust.py +++ b/scheme/autoadjust.py @@ -98,7 +98,7 @@ def adjust(hex: str, light: float = 0, sat: float = 0) -> str: def grayscale(hex: str, light: bool) -> str: h, l, s = hex_to_hls(hex) - return hls_to_hex(h, min(0.5, l) if light else max(0.5, l), 0) + return hls_to_hex(h, 0.5 - l / 2 if light else l / 2 + 0.5, 0) def distance(colour: str, base: str) -> float: -- cgit v1.2.3-freya