From 7329aa76937b5fd225bb561459a2f5c70a57819d Mon Sep 17 00:00:00 2001 From: frank <420@shampoo.ooo> Date: Tue, 8 Mar 2022 22:26:32 -0500 Subject: [PATCH] remove extra color object from hue shift method --- pgfw/extension.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgfw/extension.py b/pgfw/extension.py index 7a64943..cf08698 100644 --- a/pgfw/extension.py +++ b/pgfw/extension.py @@ -340,11 +340,11 @@ def get_busy_channel_count(): def get_hue_shifted_surface(base, offset): surface = base.copy() pixels = PixelArray(surface) - color = Color(0, 0, 0) for x in range(surface.get_width()): for y in range(surface.get_height()): rgb = surface.unmap_rgb(pixels[x][y]) - h, s, l, a = Color(*rgb).hsla + color = Color(*rgb) + h, s, l, a = color.hsla if a and surface.get_colorkey() != rgb: color.hsla = (int(h) + offset) % 360, int(s), int(l), int(a) pixels[x][y] = color