๐ Beautiful rainbow terminal
npm install rainbow-terminal --save
const rainbow = require('rainbow-terminal')
const RGB = ['red', 'green', 'blue']
// rainbow font
console.log(rainbow(RGB)('Hello world!'))
// rainbow background
console.log(rainbow(RGB)('Hello world!', { bg: true }))
Cli
# rainbow font
rainbow "Hello world!" red green blue
# rainbow background
rainbow "Hello world!" red green blue bg
The usage is almost identical to gradient-string, with the following differences
rainbow-terminal
has no built-in gradient colorgradient-string
single-line string will clear all spaces in the stringgradient-string
does not support background colorsgradient-string
does not support solid colors, only gradientsgradient-string
did not exportchalk
gradient-string
Multiline call requiredmultiline()