npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pantone-tcx

v2.2.4

Published

Find the nearest Pantone TCX color by HEX, get similar colors within a specified range, and return details like name, TCX code, or HEX value.

Readme

pantone-tcx

Pantone TCX Color Matcher

A lightweight and easy-to-use NPM package for working with Pantone TCX colors. This package allows you to:

  • Find the nearest Pantone TCX color by providing a HEX color code.
  • Get a list of similar Pantone TCX colors based on a distance threshold.
  • Return only specific details like the Pantone name, TCX code.

Features

  • Accurate Color Matching: Uses the LAB color space (Delta-E) to find the nearest Pantone TCX color.
  • Similar Colors: Retrieve Pantone TCX colors similar to the provided HEX color within a specified distance.
  • Flexible Output: Choose to get only the Pantone name, TCX code, or the full color object.
  • Easy Integration: Simple and fast to integrate into any design system or color-related project.

Installation

To install the package, run the following command:

npm install pantone-tcx

Usage

1. Find the Nearest Pantone TCX Color getNearestPantone

Use getNearestPantone to find the Pantone TCX color closest to a given HEX color. It will return the nearest Pantone color with its name, TCX code, and HEX value.

  • Possible to use hex3 or hex6 vales. (e.g., #fff or #ffffff)
import { getNearestPantone } from "pantone-tcx";

const nearestColor = getNearestPantone("#ffffff");

console.log(nearestColor);

// Output:
// {
//   name: 'Stalactite',
//   tcx: '11-4101',
//   hex: '#F7F6F2'
// }

2. Get Similar Pantone TCX Colors getSimilarColors

Use getSimilarColors to retrieve Pantone TCX colors that are similar to the input HEX color. You can specify a maxDistance to control how similar the colors should be.

  • Possible to use hex3 or hex6 vales. (e.g., #fff or #ffffff) & for maxDistance a number or string (e.g., 12 or "12")
import { getSimilarColors } from "pantone-tcx";

const similarColors = getSimilarColors("#ffffff", 24);

console.log(similarColors);

// Output:
// [
//   { name: 'Stalactite', tcx: '11-4101', hex: '#F7F6F2' },
//   { name: 'Lucent White', tcx: '11-0700', hex: '#F4F7FF' },
//   { name: 'Bright White', tcx: '11-0601', hex: '#F4F5F0' },
//   ...
// ]

3. Get Only the Pantone TCX Name getNearestPantoneName

You can easily access just the Pantone TCX name of the nearest color:

import { getNearestPantone } from "pantone-tcx";

const nearestColorName = getNearestPantoneName("#ffffff");

console.log(nearestColorName);

// Output: 'Stalactite'

4. Get Only the Pantone TCX code getNearestPantoneTcx

You can easily access just the Pantone TCX code of the nearest color:

import { getNearestPantone } from "pantone-tcx";

const nearestColorName = getNearestPantoneTcx("#ffffff");

console.log(getNearestPantoneTcx);

// Output: '11-4101'

Visit our Website Developed to help textile, fashion & interior designers boots their productivity with Pantone TCX colors

Author

pantone-tcx is written by Pedro Duque