From 3c0dc265eab573ac12da3faf2f9509bea957192d Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 29 Nov 2022 13:37:04 +0000 Subject: [PATCH 1/2] Removed orange color --- gif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gif.py b/gif.py index 7aa4b61..5dbf4ff 100644 --- a/gif.py +++ b/gif.py @@ -21,8 +21,8 @@ colors = [ color("#191919"), color("#282a2e"), color("#373b41"), - color("#f58f44") ] +#color("#f58f44") sorted(colors, key=rgb_to_v) p = len(colors) From 40197ffde52e843b54ea0ac32d88fcc9ef2ec27c Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 29 Nov 2022 13:39:17 +0000 Subject: [PATCH 2/2] Use different colour pallet for image --- gif.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gif.py b/gif.py index 5dbf4ff..68b6cd8 100644 --- a/gif.py +++ b/gif.py @@ -22,12 +22,15 @@ colors = [ color("#282a2e"), color("#373b41"), ] -#color("#f58f44") +colors2 = colors + [ + color("#f58f44") +] sorted(colors, key=rgb_to_v) -p = len(colors) +sorted(colors2, key=rgb_to_v) -def make(filename, inp=None): +def make(filename, colors, inp=None): + p = len(colors) w = int(128 / p) * p h = int(128 / p) * p @@ -58,7 +61,7 @@ def make(filename, inp=None): frames[0].save(filename, mode="P", format="GIF", append_images=frames[1:], save_all=True, duration=100, loop=0) -make("dist/images/bg.gif") -make("dist/images/remotecontrol.gif", inp="images/remotecontrol-small.png") +make("dist/images/bg.gif", colors) +make("dist/images/remotecontrol.gif", colors2, inp="images/remotecontrol-small.png")