From 9fff17787b195e53ff0d9ef97b8579b57fc10c85 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 17 Feb 2022 14:29:12 +0200 Subject: Fixed mismatched banner and background There was an issue with loss of color precision. Saturation dropped to zero when converting to 8-bit RGB. --- src/ui/color.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/color.c') diff --git a/src/ui/color.c b/src/ui/color.c index 824342ae..9cba322d 100644 --- a/src/ui/color.c +++ b/src/ui/color.c @@ -522,8 +522,8 @@ iHSLColor setLum_HSLColor(iHSLColor d, float lum) { } iHSLColor addSatLum_HSLColor(iHSLColor d, float sat, float lum) { - d.sat = iClamp(d.sat + sat, 0, 1); - d.lum = iClamp(d.lum + lum, 0, 1); + d.sat = iClamp(d.sat + sat, minSat_HSLColor, 1); + d.lum = iClamp(d.lum + lum, minSat_HSLColor, 1); return d; } -- cgit v1.2.3