GithubHelp home page GithubHelp logo

gerhobbelt / d3-hsv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d3/d3-hsv

0.0 3.0 0.0 19 KB

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

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%

d3-hsv's Introduction

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-hsv's People

Contributors

mbostock avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.