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

@types/color-convert

Package Overview
Dependencies
Maintainers
1
Versions
6
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

  • 2.0.4
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

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

FAQs

Package last updated on 27 Sep 2024

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