@radulucut/green-to-red
v1.0.11
Published
Get a color from a green to red scale
Downloads
7
Maintainers
Readme
green-to-red
Get a color from a green to red scale
Install
$ npm install @radulucut/green-to-red --save
Usage
const greenToRed = require("@radulucut/green-to-red");
greenToRed(0); // Output -> [0, 255, 0]
greenToRed(20, true); // Output -> #32ff00
greenToRed(100, true); // Output -> #ff0000
Demo
https://radulucut.github.io/green-to-red/demo/