https://github.com/radulucut/green-to-red
Get a color from a green to red scale
https://github.com/radulucut/green-to-red
color green green-to-red red scale
Last synced: 5 months ago
JSON representation
Get a color from a green to red scale
- Host: GitHub
- URL: https://github.com/radulucut/green-to-red
- Owner: radulucut
- License: mit
- Created: 2019-11-03T11:26:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T08:02:18.000Z (almost 2 years ago)
- Last Synced: 2025-11-21T04:08:28.993Z (6 months ago)
- Topics: color, green, green-to-red, red, scale
- Language: JavaScript
- Homepage: https://radulucut.github.io/green-to-red/demo/
- Size: 242 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# green-to-red

[](https://www.npmjs.com/package/@radulucut/green-to-red)
[](https://www.npmjs.com/package/@radulucut/green-to-red)
[](https://github.com/radulucut/green-to-red/blob/master/LICENSE)
Get a color from a green to red scale

## Install
```
$ npm install @radulucut/green-to-red --save
```
## Usage
```javascript
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/