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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hue-radar

v2.0.0

Published

🎨 A tool for discovering all of the colors used in your project.

Downloads

17

Readme


hue-radar is a CLI tool for discovering all of the colors used in your project.

Purpose

If not maintained well, large and long-running web app projects are likely to have colors littered throughout the codebase. This can make it difficult for your design or front-end team to audit, scale and maintain in the long run. This tool was created to help you identify and wrangle every color in your codebase.

It's sort of like greping for various colors, but better for the following reasons:

  • Handles lots of edge-cases that a complex grep may miss.
  • Supports all color types (eg: hex, hsl, rgb(a)).
  • Presents findings in a normalized and reasonable way.
  • Can produce a comprehensive color audit report for you.

Installation

Note: This has only been tested on NodeJS v12+. It is unlikely to work on versions below this.

Install the tool in your project, or (optionally) you can do it globally.

yarn add hue-radar
npm i hue-radar

# Or globally
npm i -g hue-radar

Usage

Call hue-radar with the options you desire, in the project.

hue-radar -p "*/**.{less,jsx}"

Options

Option | Description | Default | Notes --- | --- | --- | --- --pattern, -p | Glob pattern for files to match. More info. | "**/*.css,!node_modules/**/*" | Defaults are always included before these patterns., so specify overrides if these do not suit you. --debug, -d | Print debug statements. | false | --format, -f | Output format for the color report, json or html | json | --output, -o | Path to the color report outputted file (optional). | hue-radar.report.{format} | --sort-algorithm, -s | Algorithm for sorting colors (distance | deltaE). | distance | Sort by either Euclidean distance (distance) or deltaE color difference (deltaE). --convert-to-hex, -h | Converts all rgb/hsl colors in the report to hex, for grouping purposes. | false | You will still see the discovered source color, this just helps group same colors.

Contributing

Feel free to file issues with ideas or questions, or submit pull requests with new features or bugfixes.

When submitting pull requests, at the very least please add unit tests for any new functionality, and follow the code styles set forth in the config.

License

FOSSA Status


✌️ Built by Dave.