From 87e1104d3fdc280f2244d25be74d2b757ea2eeaf Mon Sep 17 00:00:00 2001 From: Marco Gallegos Date: Tue, 20 Jan 2026 12:25:13 -0600 Subject: [PATCH] Remove scripts from repository for now Remove tools/ directory containing generate_swatches.py and downscale_colors.py as they are not needed at this time. --- tools/downscale_colors.py | 25 -------------------- tools/generate_swatches.py | 48 -------------------------------------- 2 files changed, 73 deletions(-) delete mode 100644 tools/downscale_colors.py delete mode 100644 tools/generate_swatches.py diff --git a/tools/downscale_colors.py b/tools/downscale_colors.py deleted file mode 100644 index 6b878eb..0000000 --- a/tools/downscale_colors.py +++ /dev/null @@ -1,25 +0,0 @@ -from PIL import Image -import os - -# ========================= -# CONFIGURACIÓN -# ========================= -INPUT_DIR = "assets/colors" -OUTPUT_SIZE = (32, 32) # cambia a (24, 24) si lo prefieres - -SUPPORTED_EXTENSIONS = (".png", ".jpg", ".jpeg", ".webp") - -# ========================= -# DOWNSCALE -# ========================= -for filename in os.listdir(INPUT_DIR): - if filename.lower().endswith(SUPPORTED_EXTENSIONS): - path = os.path.join(INPUT_DIR, filename) - - with Image.open(path) as img: - img = img.convert("RGB") - img = img.resize(OUTPUT_SIZE, Image.Resampling.LANCZOS) - img.save(path, optimize=True) - - print(f"Downscaled {filename} to {OUTPUT_SIZE[0]}x{OUTPUT_SIZE[1]}") - diff --git a/tools/generate_swatches.py b/tools/generate_swatches.py deleted file mode 100644 index 595f7d9..0000000 --- a/tools/generate_swatches.py +++ /dev/null @@ -1,48 +0,0 @@ -from openai import OpenAI -import base64 -import os - -# ========================= -# CONFIGURACIÓN API -# ========================= -# Set OPENAI_API_KEY as environment variable or replace below -OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") -if not OPENAI_API_KEY: - raise ValueError("OPENAI_API_KEY environment variable not set") -client = OpenAI(api_key=OPENAI_API_KEY) - -# ========================= -# CONFIGURACIÓN -# ========================= -SIZE = "1024x1024" # Tamaño válido -OUTPUT_DIR = "assets/colors" - -COLORS = { - "bone-white": "#F6F1EC", - "soft-cream": "#EFE7DE", - "mocha-taupe": "#B8A89A", - "deep-earth": "#6F5E4F", - "charcoal-brown": "#3F362E", -} - -PROMPT_TEMPLATE = ( - "A flat square color swatch, solid fill, hex color {hex}. " - "No gradients, no texture, no shadow, no border. " - "Minimal, neutral, technical style." -) - -os.makedirs(OUTPUT_DIR, exist_ok=True) - -for name, hex_color in COLORS.items(): - prompt = PROMPT_TEMPLATE.format(hex=hex_color) - - result = client.images.generate(model="gpt-image-1", prompt=prompt, size=SIZE) - - image_base64 = result.data[0].b64_json - image_bytes = base64.b64decode(image_base64) - - output_path = os.path.join(OUTPUT_DIR, f"{name}.png") - with open(output_path, "wb") as f: - f.write(image_bytes) - - print(f"Generated {output_path}")