New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cssrgb

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssrgb

Generates a list of RGB colors on a CSS file and provides CSV output

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#cssrgb Generates a list of RGB colors on a CSS file and provides CSV output

Install

npm -g cssrgb

Usage

Call cssrgb with as many css URLs as you want. Minimum is 1 URL

cssrgb http://your-domain.com/css/yourcss.css [http://your-domain.com/css/another.css http://your-domain.com/css/yet_another.css]`

What is it?

cssrgb is a small package that:

  • Analyses a given CSS url
  • Parses all colors in hexadecimal
  • Converts the #hex colors to RGB
  • Generates a CSV file with the following format:
"r","g","b"
"242","246","250"
"255","187","57"
"255","202","86"
...

This output is used to generate color charts by RGB proximity, like this:

Color bar

This is the first step of this project, next iteration will be to generate html output with this proximity algorithm, instead of only csv

Why?

It's common in big CSS files to have slight variations of colors, what can pollute the styles. Usually result of using color picker to get a color value instead of reusing what was already available.

The idea of this project is to first map out used colors by visual proximity, and in a second step replace them by a standart one, making the CSS consistent.

Ideas? Suggestions?

Feel free to fork and do pull requests, or open an issue here.

Keywords

FAQs

Package last updated on 10 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc