I used a python code:
import os
import random
from pathlib import Path
from PIL import Image
def randomize_image(image_path):
try:
img = Image.open(image_path).convert("RGBA")
width, height = img.size
pixels = img.load()
for x in range(width):
for y in range(height):
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
a = pixels[x, y][3]
pixels[x, y] = (r, g, b, a)
img.save(image_path)
print(f"Randomized: {image_path.name}")
except Exception as e:
print(f"Failed to process {image_path.name}: {e}")
def process_resource_pack(pack_path):
path = Path(pack_path)
if not path.exists():
print("Error: The specified path does not exist.")
return
png_files = list(path.glob("**/*.png"))
print(f"Found {len(png_files)} texture files. Starting randomization...\n")
for img_path in png_files:
randomize_image(img_path)
print("\nAll textures have been randomized successfully!")
if __name__ == "__main__":
resource_pack_folder = "."
process_resource_pack(resource_pack_folder)
to change all pixels to random colors. it's beautiful!