Socket
Socket
Sign inDemoInstall

@types/d3-color

Package Overview
Dependencies
0
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/d3-color

TypeScript definitions for D3JS d3-color module


Version published
Weekly downloads
3.9M
increased by12.67%
Maintainers
1
Created
Weekly downloads
 

Package description

What is @types/d3-color?

@types/d3-color is a TypeScript type definition package for the d3-color module, which is part of the D3.js library. This package provides type definitions for color manipulation and conversion functions, allowing developers to work with colors in a type-safe manner in TypeScript projects.

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

Creating Colors

This feature allows you to create a color object from a string representing a color. The color can be specified in various formats such as named colors, hexadecimal, RGB, etc.

const color = d3.color("steelblue");

Color Conversion

This feature allows you to convert colors between different color spaces, such as RGB to HSL. This is useful for various color manipulations and visualizations.

const rgbColor = d3.rgb("steelblue");
const hslColor = d3.hsl(rgbColor);

Color Manipulation

This feature allows you to manipulate colors by making them brighter, darker, or adjusting their opacity. This is useful for creating visual effects and ensuring color contrast.

const brighterColor = d3.color("steelblue").brighter(1.5);

Other packages similar to @types/d3-color

Readme

Source

Installation

npm install --save @types/d3-color

Summary

This package contains type definitions for D3JS d3-color module (https://github.com/d3/d3-color/).

Details

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

Additional Details

  • Last updated: Tue, 06 Jul 2021 20:32:36 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Tom Wanzek, Alex Ford, Boris Yankov, denisname, Hugues Stefanski, and Nathan Bierema.

FAQs

Last updated on 06 Jul 2021

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc