remove extra color object from hue shift method
This commit is contained in:
parent
f5de024ef3
commit
7329aa7693
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue