Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hsluv

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hsluv

Human-friendly HSL

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
249K
decreased by-4.82%
Maintainers
1
Weekly downloads
 
Created

What is hsluv?

The hsluv npm package provides a human-friendly alternative to the HSL (Hue, Saturation, Lightness) color space. It aims to make it easier to work with colors in a way that is perceptually uniform, meaning that changes in lightness or saturation appear consistent to the human eye.

What are hsluv's main functionalities?

Convert HSLuv to RGB

This feature allows you to convert HSLuv color values to RGB color values. The code sample demonstrates converting an HSLuv color with hue 0, saturation 100, and lightness 50 to its RGB equivalent.

const hsluv = require('hsluv');
const rgb = hsluv.hsluvToRgb([0, 100, 50]);
console.log(rgb); // [1, 0, 0]

Convert RGB to HSLuv

This feature allows you to convert RGB color values to HSLuv color values. The code sample demonstrates converting an RGB color with values [1, 0, 0] to its HSLuv equivalent.

const hsluv = require('hsluv');
const hsluvColor = hsluv.rgbToHsluv([1, 0, 0]);
console.log(hsluvColor); // [0, 100, 50]

Convert HSLuv to Hex

This feature allows you to convert HSLuv color values to Hex color values. The code sample demonstrates converting an HSLuv color with hue 0, saturation 100, and lightness 50 to its Hex equivalent.

const hsluv = require('hsluv');
const hex = hsluv.hsluvToHex([0, 100, 50]);
console.log(hex); // '#ff0000'

Convert Hex to HSLuv

This feature allows you to convert Hex color values to HSLuv color values. The code sample demonstrates converting a Hex color '#ff0000' to its HSLuv equivalent.

const hsluv = require('hsluv');
const hsluvColor = hsluv.hexToHsluv('#ff0000');
console.log(hsluvColor); // [0, 100, 50]

Other packages similar to hsluv

Keywords

FAQs

Package last updated on 15 Dec 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