remove extra color object from hue shift method

This commit is contained in:
frank 2022-03-08 22:26:32 -05:00
parent f5de024ef3
commit 7329aa7693
1 changed files with 2 additions and 2 deletions

View File

@ -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