Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including slippy-colors with all npm packages installed. Try it out:

var slippyColors = require("slippy-colors")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

slippy-colors v0.0.2

A D3 color picker component.

A D3 color picker component. It's a color picker...and a slippy map.

Based on Eric Fischer's perceptually accurate color spectrum, using Tom MacWright's JavaScript implementation.

See it in action.

usage

d3.select('body')
    .append('div')
    .call(ColorPicker()
         .width(700)
         .height(500)
         .on('mouseup', function(c) { console.log(c) }));
             // or whatever you want to do with the hex color returned on click

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free