The goal of dmc is to allow you to find the closest DMC embroidery floss colour(s) for a given colour, as well as access colour (hex, RGB) information about DMC colours.

If you’d like to use dmc without having to install the package (or R!), there is a Shiny app as well (in its own package, dmcapp).

Installation

You can install the development version of dmc from github with:

Example

Say I’m interested in finding the closest DMC floss colour for the background colour of the dplyr package’s hex logo 😈.

I can look up the hex code for this colour via a site like HTML Color Codes. The hex code is “#EE8726”.

Then, I can use dmc() to find the closest DMC floss for this colour:

I can choose to show more than one matching colour:

And to turn off the visualization of the colours:

By default, dmc() uses Euclidean distance to find the closest floss colour. The method can be changed to be one of “euclidean”, “cie1976”, “cie94”, “cie2000”, or “cmc”. For example:

If I want to go the other way and just find the hex/RGB information for a given DMC floss, I can use undmc(). By default, this visualizes the DMC floss:

Again, the visualization can be turned off:

undmc() mostly just takes the DMC floss number, except in cases where there isn’t one (e.g., Ecru).

A full list of floss colours in the package is available via floss:

where the values in floss[["dmc"]] are all that can be passed to undmc().