Socket
Socket
Sign inDemoInstall

d3-hsv

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    d3-hsv

The HSV (Hue, Saturation, Value) color space.


Version published
Maintainers
1
Install size
73.7 kB
Created

Readme

Source

d3-hsv

This module implements the HSV (Hue, Saturation, Value) color space.

Installing

If you use NPM, npm install d3-hsv. Otherwise, download the latest release. You can also load directly from d3js.org as a standalone library. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3 global is exported:

<script src="https://d3js.org/d3-color.v0.5.min.js"></script>
<script src="https://d3js.org/d3-hsv.v0.0.min.js"></script>
<script>

var yellow = d3.hsv("yellow"); // {h: 60, s: 1, v: 1, opacity: 1}

</script>

Try d3-hsv in your browser.

API Reference

# d3.hsv(h, s, v[, opacity])
# d3.hsv(specifier)
# d3.hsv(color)

Constructs a new HSV color. The channel values are exposed as h, s and v properties on the returned instance.

If h, s and v are specified, these represent the channel values of the returned color; an opacity may also be specified. If a CSS Color Module Level 3 specifier string is specified, it is parsed and then converted to the HSV color space. See d3.color for examples. If a color instance is specified, it is converted to the RGB color space using color.rgb and then converted to HSV.

# d3.interpolateHsv(a, b)

# d3.interpolateHsvLong(a, b)

Keywords

FAQs

Last updated on 06 Apr 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc