Matching a colour palette to DMC thread
Quick answer: to convert a hex code to DMC, paste the code into a hex to DMC converter and it’ll give you the closest thread. This post shows how, using a famous palette.
If you’ve got a hex code and need to know which DMC thread to buy, a hex to DMC converter will give you the closest match in seconds.
I’ve used Mondrian’s Composition with Red, Yellow, and Blue (1927) as my example. It’s out of copyright, it only has five colours, and it’s all big flat blocks, so it makes a forgiving first project. I also love his works so I’ll very much enjoy stitching this one up!
What is a hex code, and why match it to DMC thread?
A hex code is a six-character code, like #FF0000, that tells a screen exactly which colour to show. Most image editors, palette tools and websites give colours as hex codes. DMC thread is sold by number, so to stitch with colours you’ve found online, you need to turn each hex code into a DMC number.
Step 1: Get the hex code for each colour

I used the Cleveland Museum of Art’s open access photo of the painting and sampled a flat area of each colour with an eyedropper tool. Pick the middle of a block rather than near an edge, because edges are blurred and give you a muddy value.
- Red: #d85a4e
- Yellow: #e7d492
- Blue: #2b67a3
- White: #d2d1cd
- Black: #1f1f20
Museum photos vary in lighting, so a different photo of the same painting would give slightly different codes.
Step 2: Use a hex to DMC converter
I put each code into our free hex to DMC converter and got this:
| Colour in the painting | Your hex | DMC number | DMC name | DMC hex |
|---|---|---|---|---|
| Red | #d85a4e | 350 | Coral Medium | #E04848 |
| Yellow | #e7d492 | 3822 | Straw Light | #F6DC98 |
| Blue | #2b67a3 | 312 | Baby Blue Very Dark | #35668B |
| White | #d2d1cd | 168 | Pewter Very Light | #D1D1D1 |
| Black | #1f1f20 | 310 | Black | #000000 |

The white came back as a light grey and the yellow as a pale straw, which comes from the lighting in the museum’s photo. The black is the closest available match: my charcoal landed on DMC 310, which is true black, so the thread will look slightly darker than the painting. DMC names can be misleading too: Baby Blue Very Dark is a deep blue, so go by the number and the swatch.
Tips for the best hex to DMC match
- Sample flat areas of colour, not edges.
- If you can, take the hex code from the same image each time, so the lighting is consistent.
- Look at the top two or three matches, not only the first.
- Hold a shade card or a skein up to your screen before you buy a large amount.
Step 3: Build the palette in Heddle

With the threads chosen, I built the pattern in Heddle. It’s 55 × 55 stitches on 14 count, which finishes at 3.9 × 3.9 inches (10 × 10 cm). You can open the pattern, check the thread list and track your stitches there.