Reset highlight colour to always be red

This commit is contained in:
akp 2024-12-08 17:08:36 +00:00
parent 8c2606b60b
commit a4835f609e
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755
2 changed files with 2 additions and 7 deletions

View file

@ -42,11 +42,7 @@ def get_colour_for(n):
scale_factor = 8 scale_factor = 8
def get_highlight_for(n): def generate_frame(i, base_img, highlight_locs, sequence) -> int:
return tuple(map(lambda x: int(x * 255), hsv_to_rgb(n, 0.82, 1)))
def generate_frame(i, base_img, highlight_locs, hc, sequence) -> int:
for n in range(len(sequence)): for n in range(len(sequence)):
s = sequence[: n + 1] s = sequence[: n + 1]
img = base_img.copy() img = base_img.copy()
@ -56,7 +52,7 @@ def generate_frame(i, base_img, highlight_locs, hc, sequence) -> int:
img.putpixel(p, get_colour_for((j + 1) / sl)) img.putpixel(p, get_colour_for((j + 1) / sl))
for h in highlight_locs: for h in highlight_locs:
img.putpixel(h, hc) img.putpixel(h, highlight_colour)
maxx, maxy = img.size maxx, maxy = img.size
img = img.resize( img = img.resize(
@ -115,7 +111,6 @@ if __name__ == "__main__":
i, i,
base_img, base_img,
(a, b), (a, b),
get_highlight_for(ns.index(antenna_type) / nns),
this_iter, this_iter,
) )
update_base(base_img, this_iter) update_base(base_img, this_iter)