diff options
author | davidovski <david@davidovski.xyz> | 2022-12-11 20:33:31 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-12-11 20:33:31 +0000 |
commit | 7acbb084388e3b7d13f37b65e0b5cf2756d6cf26 (patch) | |
tree | 28cf5ddcce453dd3bccb9563777edd6885d252b9 | |
parent | 1c1ebec42b13e3402f5019a4b9ace8ccec105f72 (diff) | |
parent | c504f179d2a7b3232ad1fbd77de160430e0830ed (diff) |
Merge branch 'master' of git.cheetah.remote:davidovski
-rw-r--r-- | gif.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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") |