🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hsl-regex

Regex for matching HSL colors.

1.0.0
latest
Version published
Weekly downloads
2.4M
-8.91%
Maintainers
1
Weekly downloads
 
Created

What is hsl-regex?

The hsl-regex package provides a regular expression specifically designed to match HSL (Hue, Saturation, Lightness) color codes in strings. This can be particularly useful for validating and extracting HSL color values from text content in web development and software projects that deal with color data.

What are hsl-regex's main functionalities?

HSL Color Matching

This feature allows you to match HSL color values within a string. The provided code sample demonstrates how to use the hsl-regex package to find HSL values in a CSS style declaration.

const hslRegex = require('hsl-regex');
const text = 'background-color: hsl(210, 50%, 50%);';
const matches = text.match(hslRegex());
console.log(matches);

Other packages similar to hsl-regex

FAQs

Package last updated on 30 Jan 2015

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