Inspiration

PaletteWeave explores how a small set of colours changes an image’s visual expression. It gives artists a way to compare palette learning and texture choices without sending their images to a server.

What it does

Load an image or the original procedural landscape, choose 3, 6, 8 or 12 colours, learn a palette in RGB or OKLab, and compare nearest-colour rendering with Floyd–Steinberg error diffusion. Inspect colour proportions and pixelwise OKLab error, then download a mosaic SVG made of editable coloured rectangles.

Technical implementation

A dependency-free JavaScript core implements deterministic farthest-point initialization, 15 Lloyd clustering passes, centroid-to-source-colour projection for in-gamut swatches, perceptual nearest-colour assignment and error diffusion. A separate HTML interface handles resizing, canvas rendering, controls and SVG export. Uploaded images are resized to at most 160 × 112, composited on white and held in page memory. No application request uploads the image.

Verification and lessons

The runnable checks verify reproducibility, non-increasing clustering loss, output dimensions, palette membership, total colour usage and black/white colour-conversion anchors. Dithering changes texture and may increase pixelwise error; the displayed metric is not an artistic-quality score. Established clustering and colour-science methods are used; this is a working art tool, not a claim of a new clustering algorithm.

Limitations and next steps

Working resolution is intentionally small, SVG files can be large, and alpha preservation and professional print colour management are not implemented. Next steps are accessibility review, larger-image processing in a worker, and feedback from artists. No user-study results are claimed.

Solo entry and project access

Vivaan Kandhari is the sole entrant. Built on 15 October 2026 for InnovArt. Source and instructions: https://github.com/VivaanKandhari/paletteweave . Download the files and open index.html; run node test.cjs to reproduce the checks.

Methods

OKLab follows Björn Ottosson’s published conversion: https://bottosson.github.io/posts/oklab/ . Lloyd clustering, farthest-point initialization and Floyd–Steinberg diffusion are established techniques.

Built With

Share this project:

Updates

Submission history