Craft Color Codes

v1.1.0
io.github.makebead/craft-color-codes Checked 18 hours ago Published 12 days ago

Bead, floss, yarn, LEGO and Minecraft color codes: look up, find closest, convert between brands.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_palettes List color charts

List every color chart available: fuse beads (Perler, Hama, Artkal, Nabbi, MARD), Miyuki Delica seed beads, DMC embroidery floss and diamond painting drills, Red Heart yarn, LEGO, Minecraft blocks and map colors. Returns each palette id, brand, product, number of colors and how the values were obtained (status).

get_color Look up a color code

Look up one color by its code in a palette, e.g. DMC 310, Miyuki DB0010 (also written DB10 or DB-010), Perler P38, Hama H18, MARD A1. Returns the name, hex and RGB.

ParameterTypeDescription
code *stringThe color code as printed on the bag, tube or skein.
palette *stringPalette ids or names (e.g. "dmc", "delica", "perler", "mard"). Ids: perler-midi, hama-midi, artkal-s, nabbi, mard-185, mard-221, mard-291, miyuki-delica, dmc-floss, dmc-diamond, lego, minecraft-blocks…

find_closest Closest color codes to a color

Find the closest colors to a hex or RGB color in one or more palettes, ranked by CIEDE2000 color difference (deltaE: under 1 looks identical, under 3 is a close match, over 10 is a different color). Use it to turn a picked color into a bead, thread or yarn to buy.

ParameterTypeDescription
color *stringHex (#FF8800, #F80) or rgb(255, 136, 0).
include_discontinuedbooleanInclude discontinued colors (default false).
limitintegerMatches per palette (default 3).
palettesarrayPalette ids or names (e.g. "dmc", "delica", "perler", "mard"). Ids: perler-midi, hama-midi, artkal-s, nabbi, mard-185, mard-221, mard-291, miyuki-delica, dmc-floss, dmc-diamond, lego, minecraft-blocks…

convert_color Convert a color code to another brand

Convert a color code from one brand to its closest equivalents in another, e.g. Perler P38 → Hama, DMC 310 → Miyuki Delica, MARD A1 → Artkal. Ranked by CIEDE2000 deltaE.

ParameterTypeDescription
code *stringThe color code in the source palette.
from_palette *stringPalette ids or names (e.g. "dmc", "delica", "perler", "mard"). Ids: perler-midi, hama-midi, artkal-s, nabbi, mard-185, mard-221, mard-291, miyuki-delica, dmc-floss, dmc-diamond, lego, minecraft-blocks…
to_palette *stringPalette ids or names (e.g. "dmc", "delica", "perler", "mard"). Ids: perler-midi, hama-midi, artkal-s, nabbi, mard-185, mard-221, mard-291, miyuki-delica, dmc-floss, dmc-diamond, lego, minecraft-blocks…
limitintegerNumber of matches (default 3).

search_colors Search colors by name or code

Search color names (every word must appear, e.g. "dusty rose", "light blue") or codes across palettes.

ParameterTypeDescription
query *string
limitintegerMaximum results (default 20).
palettesarrayPalette ids or names (e.g. "dmc", "delica", "perler", "mard"). Ids: perler-midi, hama-midi, artkal-s, nabbi, mard-185, mard-221, mard-291, miyuki-delica, dmc-floss, dmc-diamond, lego, minecraft-blocks…