11/23
BIN
base16/arch.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 449 KiB After Width: | Height: | Size: 449 KiB |
|
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 204 KiB |
BIN
base16/tty1.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 15 MiB After Width: | Height: | Size: 15 MiB |
BIN
everforest/futuristic_gray.png
Normal file
|
After Width: | Height: | Size: 5.4 MiB |
|
Before Width: | Height: | Size: 21 MiB After Width: | Height: | Size: 21 MiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
BIN
everforest/ocean_front_2.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
everforest/road.png
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
BIN
everforest/waves_2.png
Normal file
|
After Width: | Height: | Size: 7.7 MiB |
43
everforest_factory.py
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
from PIL import Image
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
# Everforest dark hard palette (you can adjust for soft/medium/light variants)
|
||||||
|
EVERFOREST_PALETTE = [
|
||||||
|
(235, 219, 178), # fg
|
||||||
|
(54, 61, 64), # bg0
|
||||||
|
(49, 56, 59), # bg1
|
||||||
|
(39, 46, 49), # bg2
|
||||||
|
(69, 133, 136), # aqua
|
||||||
|
(204, 36, 29), # red
|
||||||
|
(152, 151, 26), # yellow
|
||||||
|
(184, 187, 38), # green
|
||||||
|
(215, 153, 33), # orange
|
||||||
|
(177, 98, 134), # purple
|
||||||
|
(104, 157, 106), # dark green
|
||||||
|
(142, 192, 124), # light green
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def closest_color(rgb, palette):
|
||||||
|
"""Find closest color in palette to given rgb."""
|
||||||
|
r, g, b = rgb
|
||||||
|
distances = [np.sqrt((r-pr)**2 + (g-pg)**2 + (b-pb)**2) for pr, pg, pb in palette]
|
||||||
|
return palette[int(np.argmin(distances))]
|
||||||
|
|
||||||
|
|
||||||
|
def everforestify_image(input_path: str, output_path: str):
|
||||||
|
img = Image.open(input_path).convert("RGB")
|
||||||
|
pixels = np.array(img)
|
||||||
|
|
||||||
|
# Vectorized mapping
|
||||||
|
flat_pixels = pixels.reshape(-1, 3)
|
||||||
|
mapped_pixels = np.array([closest_color(tuple(p), EVERFOREST_PALETTE) for p in flat_pixels])
|
||||||
|
new_pixels = mapped_pixels.reshape(pixels.shape).astype(np.uint8)
|
||||||
|
|
||||||
|
new_img = Image.fromarray(new_pixels, "RGB")
|
||||||
|
new_img.save(output_path)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# Example usage
|
||||||
|
everforestify_image("gothic2.jpg", "everforest_gothic2.jpg")
|
||||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
BIN
gruvbox/gruv-abstract-maze.png
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 368 KiB After Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 346 KiB After Width: | Height: | Size: 346 KiB |
|
Before Width: | Height: | Size: 986 KiB After Width: | Height: | Size: 986 KiB |
|
Before Width: | Height: | Size: 284 KiB After Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 365 KiB After Width: | Height: | Size: 365 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
BIN
gruvbox/gruvbox_monokai1.jpg
Normal file
|
After Width: | Height: | Size: 349 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 443 KiB After Width: | Height: | Size: 443 KiB |
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 265 KiB |
|
Before Width: | Height: | Size: 7.1 MiB After Width: | Height: | Size: 7.1 MiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 762 KiB After Width: | Height: | Size: 762 KiB |
|
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 556 KiB After Width: | Height: | Size: 556 KiB |
BIN
monokai-pro/monokai1.jpg
Normal file
|
After Width: | Height: | Size: 350 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
BIN
nord/bridge.png
Normal file
|
After Width: | Height: | Size: 5.3 MiB |
|
Before Width: | Height: | Size: 995 KiB After Width: | Height: | Size: 995 KiB |
BIN
nord/hills.png
Normal file
|
After Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
BIN
nord/tower.png
Normal file
|
After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
BIN
other/gothic2.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 631 KiB After Width: | Height: | Size: 631 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 20 MiB After Width: | Height: | Size: 20 MiB |
BIN
other/w95.png
Normal file
|
After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 498 KiB After Width: | Height: | Size: 498 KiB |