Socket
Socket
Sign inDemoInstall

parse-color

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-color

parse a css color string (plus hsv and cmyk) into an object


Version published
Weekly downloads
160K
decreased by-17.36%
Maintainers
1
Weekly downloads
 
Created

What is parse-color?

The parse-color npm package is a utility for parsing color values from various formats (like hex, RGB, HSL, etc.) into a consistent format. It helps in converting and manipulating color values in JavaScript applications.

What are parse-color's main functionalities?

Parsing Hex Color

This feature allows you to parse a hex color string into an object containing different representations of the color, such as RGB, HSL, and HSV.

const parse = require('parse-color');
const color = parse('#ff0000');
console.log(color);

Parsing RGB Color

This feature allows you to parse an RGB color string into an object containing different representations of the color, such as hex, HSL, and HSV.

const parse = require('parse-color');
const color = parse('rgb(255, 0, 0)');
console.log(color);

Parsing HSL Color

This feature allows you to parse an HSL color string into an object containing different representations of the color, such as hex, RGB, and HSV.

const parse = require('parse-color');
const color = parse('hsl(0, 100%, 50%)');
console.log(color);

Other packages similar to parse-color

Keywords

FAQs

Package last updated on 06 Aug 2014

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