egotoadcitadel/palette-from-image-ai

AI coloring palette-from-image generator for designers and pixel artists — pull a clean named palette straight from any image, no subscription or cloud upload.

🎨 What is Palette‑From‑Image‑AI?

A Windows‑only, portable desktop program that turns any picture (photo, screenshot, game texture, painting…) into a ready‑to‑use colour palette. It does offline inference with an on‑device vision model that first segments the image into meaningful regions (sky, ground, subject, etc.) and then clusters the colours using a perceptual distance metric (CIEDE2000 in LAB space). The result is a small ordered set of 5‑16 swatches, each automatically labelled (base, accent, shadow, highlight) and exportable in a dozen formats such as HEX, CSS variables, Adobe ASE, GIMP GPL, JSON, PNG swatch sheet, SVG, etc.


⚙️ Core Architecture (as described in the README)

Component Role
On‑device vision model Performs semantic segmentation of the input image.
Perceptual colour quantiser Clusters colours using CIEDE2000 (LAB) rather than raw RGB.
Region sampler Samples colours per segment, weighting by area to give each region a fair influence.
Harmony engine Optionally snaps the palette to a colour‑harmony scheme (analogous, complementary, triadic, split‑complement).
Role tagger Auto‑assigns functional tags (base, accent, shadow, highlight, neutral).
Export layer Writes the palette to 12 different file types, including industry‑standard swatch formats.
GPU path (DX12) Optional DirectX 12 compute acceleration for large images (≈1 s for 4K).
CLI wrapper Allows scripting via command‑line arguments.

All of these pieces are bundled into a single .exe; there is no installer, no runtime dependencies, and no network traffic.


🚀 Main Features (user‑facing)

Feature What it does
Region‑aware extraction Colours are sampled per semantic region, avoiding duplicate swatches that plague naïve pixel‑frequency methods.
Perceptual clustering Uses CIEDE2000, so colours that look the same to a human are merged.
Role tagging Each swatch gets a label (base, accent, shadow, highlight) that can be edited.
Harmony constraints Choose a colour‑scheme; the engine nudges the palette toward that scheme.
12 export formats HEX, RGB, HSL, LAB, ASE, GPL, ACO, CSS vars, JSON, PNG sheet, SVG sheet, SKETCH.
Batch mode Drop a folder; the app creates one palette per image, multithreaded.
Palette diff Compare two palettes and see colour deltas – handy for art‑direction tracking.
Swatch lock Pin a colour (e.g., a brand colour) and re‑extract the rest around it.
Eyeball sampler Click any pixel to add its exact value as a swatch.
GPU toggle Enable DirectX 12 compute for faster processing of high‑resolution images.
Portable profile Settings live next to the executable; move the folder on a USB stick and everything works.
CLI mode Scripted use: palette-from-image-ai.exe --input foo.png --count 8 --format css --out palette.css.
Watch folder Auto‑process new files placed in a monitored directory.

📦 Getting Started (quick‑start steps from the README)

  1. Download the zip from the GitHub landing page. It contains the .exe and a models/ folder.
  2. Extract the whole archive to a folder you control (no installer needed).
  3. Run the .exe. The first launch builds a small shader cache (≈3 s).
  4. Drop an image onto the window or use File → Open Image.
  5. Adjust the swatch count (5‑16), pick a harmony mode, lock any colours you want to keep.
  6. Export in the format you need – one click for HEX, or right‑click a swatch to copy its value.

Typical end‑to‑end time: under a minute, or ~1.2 s for a 4K image with GPU acceleration.


🛠️ System Requirements (as listed)

Minimum Recommended
Windows 10 21H2 (64‑bit) Windows 11 23H2+
4‑core CPU, SSE4.2 8‑core CPU, AVX2
4 GB RAM 16 GB RAM
Integrated GPU (DX11) Discrete DX12 GPU, 4 GB VRAM
450 MB free disk 1.2 GB free (SSD)

No additional runtimes (no .NET, no Python, no Node). The app runs entirely in user space.


📚 Typical Use‑Cases

Scenario Why Palette‑From‑Image‑AI fits
Game asset pipelines – need ASE palettes for shaders. Direct ASE export, region‑aware colours, batch processing of sprite folders.
UI/UX design – generate colour variables for CSS. CSS‑variables export, harmony modes, role tags (base/accent).
Brand‑consistent art direction – keep a brand colour fixed while re‑deriving palettes. Swatch lock + re‑extract, palette diff to see changes over time.
Offline workflow for secure studios – cannot upload assets. Fully offline, no telemetry, portable folder.
Scripting / CI – generate palettes automatically. CLI mode and watch‑folder automation.

📌 Limitations & Known Issues (from the README)

  • First launch triggers a SmartScreen warning because the binary is unsigned.
  • Very large TIFFs (>200 MP) are not supported yet – downscale first.
  • On network drives batch mode can stall; copy locally for best speed.
  • GPU toggle is disabled on machines without a DX12 compute queue.
  • Flat‑saturated images may need a lower deduplication threshold (adjust in Settings → Advanced).

📜 License & Contribution

  • MIT License – free for personal, commercial, and educational use. Attribution is appreciated but not required.
  • The repository includes the compiled executable and model files; source code is not mentioned, so contributions would likely be limited to issue reporting or requesting new features (e.g., Linux CLI build on the roadmap).

🎯 Bottom Line

Palette‑From‑Image‑AI is a genuine, fully‑offline Windows application that leverages an on‑device vision model and perceptual colour clustering to produce high‑quality, role‑aware colour palettes from any image. Its strength lies in region‑aware extraction, a rich set of export options, and a portable, zero‑install footprint, making it useful for artists, UI designers, and game developers who need reliable palettes without relying on online services.

Related

  • Project
  • Project