1. Working in a perceptual colour space
Screens describe colour as red, green and blue light, but equal steps in RGB do not look like equal steps to people. Every pixel is converted from sRGB to linear light, then to CIE XYZ (D65 white) and finally to CIELAB, a space designed so that distances roughly match how different colours look.
2. Resampling to your grid
The photo is averaged into one colour per stitch, bead or block using an area-weighted box filter, which keeps fine detail without the jagged noise of simple sampling. For pixel art, “preserve exact colours” samples the nearest pixel instead. Crafts whose cells are not square — knitting stitches are wider than tall — are resampled with the correct proportions so circles stay round.
3. Choosing a palette
We group the colours with k-means clustering (k-means++ start, seeded so results are repeatable) in CIELAB, then snap each group's centre to the nearest real thread or bead colour using CIEDE2000, the colour-difference formula used in industry because it accounts for how we see lightness, chroma and hue differently. Duplicates are merged and, if that leaves fewer colours than you asked for, clustering runs once more.
4. Cleaning up confetti
Photos produce isolated single stitches (“confetti”) that are slow to stitch and barely visible. Cleanup finds small connected groups of one colour and reassigns them to the colour they border most — but leaves groups that differ strongly from all neighbours, such as a highlight in an eye.
5. Stitchability score
The score (0–100) weighs colour count against size, confetti, average run length and very rare colours, and the tips point at whatever is dragging it down.
Colour data and its limits
Thread and bead colour values come from community-published lists (listed under Data sources below), with obvious errors corrected. They are approximations: dye lots vary, threads have sheen and screens differ. Match ratings — very close (ΔE ≤ 3), close (≤ 6), approximate (≤ 10) — describe the data, so always check real materials for important colours.
On our colour charts and conversion tables, the equivalent we show is the nearest colour by ΔE, with two tie-breaks. A plain colour is matched to a plain one rather than a neon, glitter, pearl, metallic, glow or transparent bead when a plain shade is within 5 ΔE of the nearest, because those finishes look different in a finished piece even when their RGB value is close. And when a shade with the same official name (black for black) is within 1.5 ΔE of that match, a difference barely visible, we prefer it.
Data sources and credits
- DMC: colour values from CrossStitchCreator as cleaned in the dmc R package; the 2017–2018 colours (01–35) and corrections to 309, 3848 and 3849 from craft-color-codes by MakeBead, licensed CC BY 4.0 (we merged them into our list and assign our own colour families).
- Anchor: swatch colours sampled from Anchor's official stranded cotton shade card, using the method of the xstitch R package. We re-matched 31 shades that its extraction had shifted by one row, and because photographed thread reads darker than flat screen colour, we mapped the card's lightness and saturation onto the same scale as our DMC data (darkest to darkest, palest to palest). Anchor publishes no colour values, so these are the least certain of our thread colours. Names are our own descriptions.
- Perler, Hama, Artkal, Nabbi and MARD beads: the community beadcolors dataset (MIT); MARD names are our own descriptions.
- Yarn, brick, cylinder bead and pony bead palettes: our own generic palettes.
Brand names are trademarks of their owners and are used only to identify compatible colours; CraftPatterns is not affiliated with any brand.
Last updated · About us