summaryrefslogtreecommitdiff
path: root/gif.py
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-12-11 20:33:31 +0000
committerdavidovski <david@davidovski.xyz>2022-12-11 20:33:31 +0000
commit40a6aabbdb721da1e0b3f0274a1689cccbb3415f (patch)
tree28cf5ddcce453dd3bccb9563777edd6885d252b9 /gif.py
parent641d6178dc957e774e78c3c6cfa8b837d8fe260f (diff)
parent40197ffde52e843b54ea0ac32d88fcc9ef2ec27c (diff)
Merge branch 'master' of git.cheetah.remote:davidovski
Diffstat (limited to 'gif.py')
-rw-r--r--gif.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/gif.py b/gif.py
index 33d414d..827f150 100644
--- a/gif.py
+++ b/gif.py
@@ -20,14 +20,16 @@ replace = color("#f58f44")
colors = [
color("#191919"),
color("#373b41"),
- color("#282a2e"),
- 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 +60,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")