
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
gradient-now
Advanced tools
gradient-now is a command-line tool that generates a gradient of colors based on the input provided. You can specify any number of colors in hexadecimal format or color names, followed by a number indicating the steps in the gradient.
gradient-now is a command-line tool that generates a gradient of colors based on the input provided. You can specify any number of colors in hexadecimal format or color names, followed by a number indicating the steps in the gradient.
To install gradient-now, use the following npm command:
$ npm install -g gradient-now
$ gradient-now color1 color2 ... colorN steps
You can also add --list to the end of the command to return an array of string values instead.
$ gradient-now red blue 8
Will return eight hexadecimals colors starting the gradient at red and ending at blue:
#ff0000 #db0024 #b60049 #92006d #6d0092 #4900b6 #2400db #0000ff
$ gradient-now aquamarine #912798 #abd778 12 --list
Will return an array of hexadecimal string values:
[
'#7fffd4', '#82d8c9', '#86b0be', '#8989b3', '#8c62a8', '#8f3b9d',
'#933795', '#98578f', '#9d7789', '#a29784', '#a6b77e', '#abd778'
]
In both cases, the tool will output a set of colors representing the requested gradient.
This of course also makes gradient-now a convenient tool to quickly return an average of two colors.
$ gradient-now yellow red 3
Will return three colors where the average color will be the second one:
#ffff00 #ff8000 #ff0000
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
gradient-now is a command-line tool that generates a gradient of colors based on the input provided. You can specify any number of colors in hexadecimal format or color names, followed by a number indicating the steps in the gradient.
We found that gradient-now demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.