You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@types/color-convert

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/color-convert

TypeScript definitions for color-convert


Version published
Weekly downloads
976K
decreased by-0.01%
Maintainers
1
Install size
24.1 kB
Created
Weekly downloads
 

Package description

What is @types/color-convert?

@types/color-convert provides TypeScript type definitions for the color-convert library, which is used to convert between different color models such as RGB, HSL, HSV, and more.

What are @types/color-convert's main functionalities?

Convert RGB to HSL

This feature allows you to convert RGB color values to HSL. In this example, the RGB value (255, 0, 0) is converted to HSL, resulting in [0, 100, 50].

const colorConvert = require('color-convert');
const hsl = colorConvert.rgb.hsl(255, 0, 0); // [0, 100, 50]

Convert HEX to CMYK

This feature allows you to convert HEX color values to CMYK. In this example, the HEX value '#FF0000' is converted to CMYK, resulting in [0, 100, 100, 0].

const colorConvert = require('color-convert');
const cmyk = colorConvert.hex.cmyk('#FF0000'); // [0, 100, 100, 0]

Convert HSL to RGB

This feature allows you to convert HSL color values to RGB. In this example, the HSL value (0, 100, 50) is converted to RGB, resulting in [255, 0, 0].

const colorConvert = require('color-convert');
const rgb = colorConvert.hsl.rgb(0, 100, 50); // [255, 0, 0]

Other packages similar to @types/color-convert

Readme

Source

Installation

npm install --save @types/color-convert

Summary

This package contains type definitions for color-convert (https://github.com/qix-/color-convert#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-convert.

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/color-name

Credits

These definitions were written by Junyoung Clare Jang, and Piotr Błażejewicz.

FAQs

Package last updated on 07 Nov 2023

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc