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

colors-le

v2.6.2

Published

Extract every color in a codebase, and say which ones are not in your palette.

Readme

colors-le

Find every colour in a codebase and, given a palette, say which ones are not in it. Answered over a whole repository with an exit code a CI step can fail on.

npx colors-le src/
npx colors-le --palette brand.txt src/
npx colors-le --values --dedupe src/ | sort -u   # the start of a palette

This is the same command line as the Rust crate colors-le, and it behaves identically: same flags, same walk, same output, same exit codes. Install whichever toolchain you already have.

What it reads

Every file. CSS, SCSS, LESS, Stylus, HTML, XML, SVG, JavaScript, TypeScript, JSON, YAML, TOML, Markdown and plain text are read by name, and anything else is scanned as raw text and reported as format unknown. Directories are walked the way ripgrep walks them: .gitignore, .ignore and hidden files are respected unless you pass --no-ignore or --hidden. A binary file is passed over and counted in the summary.

Output

stdout carries one JSON report per file whenever it is piped or redirected, and nothing when it is a terminal. stderr carries the human summary.

{"file":"src/theme.css","format":"css","colors":[{"value":"#1a2b3c","notation":"hex","line":4,"column":12,"inPalette":true}],"diagnostics":[],"summary":{"colors":1,"outsidePalette":0}}

inPalette appears only when a palette was given.

The palette

--palette <file> takes one colour per line, a JSON array, or a flat JSON object's values. Comparison is by colour, so #FFF, #ffffff and rgb(255, 255, 255) are one entry. A named colour is only equal to itself: white in the palette does not approve #ffffff.

Exit codes

  • 0: colours found, and none outside the palette.
  • 1: no colours found, or at least one outside the palette.
  • 2: the question was malformed, or --strict and a text file could not be read.

For agents

colors-le mcp serves the Model Context Protocol on stdio with two tools: extract_colors for a document's text and colors_le_scan for files and directories. Hosts that want the server alone can install colors-le-mcp.

colors-le --help lists every option.

MIT licensed. Part of letools.