New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@logilab/colorscale

Package Overview
Dependencies
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logilab/colorscale

User interface to display a color scale for scientific visualization

  • 3.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

====================================== A simple color scale React component

Colorscale is an open source reactjs_ component that uses the chromajs_ library to generate a pretty color scale, suitable as a legend for scientific plots or maps.

By default, it will display a 10-step multi-hued (yellow, red, black) color scale with legend values between 1 and 0.

It is customizable using title, min, max, nsteps, which are self-explanatory, or directly with ticks (the csv of all tick values).

Example usage::

var colorScale = require('./colorscale').colorScale;

var cs = colorScale(document.getElementById('color-scale'), {title: 'Temperature (°C)', min: 0., max: 100, nsteps: 10, reverse: true});

console.log(cs.getColor(74)); // prints "#f9b200"

.. _chromajs: http://gka.github.io/chroma.js/ .. _reactjs: http://facebook.github.io/react/

FAQs

Package last updated on 12 Jan 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc