CIEDE2000 Colour Matching Maps Pixel Art to 447 DMC Embroidery Threads in JavaScript
Turning a photo into a cross-stitch chart means assigning each cell one of the 447 classic DMC stranded cotton threads, which requires choosing the closest match for every pixel. The article explains that simple RGB distance performs poorly on faces because low-chroma skin tones make grey-tinted threads appear numerically close, producing olive or mauve results. It proposes converting colours to CIELAB and using the CIEDE2000 formula, which better reflects human perception, especially near neutral tones. The author provides JavaScript code for the conversion and distance calculation, along with a caching approach for efficiency. Additional steps include downscaling the image so one pixel equals one stitch, and limiting the palette to about 30 threads to avoid impractical purchases.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in