text2gradient
v1.0.9
Published
v 1.0.9
Downloads
4
Maintainers
Readme
Update
v 1.0.8
Added 5 more preset gradient colors
- netflix
- instagram
- carlo
- royalpetrol
- mermariani
Updates to come
Add support for ansi characters
Add more preset gradients
Installation
You can install the text2gradient module using npm:
npm install text2gradient
Usage
To use the typer-effect module in your Node.js project, you can import the module like this:
const text2gradient = require('text2gradient');
You can then call the gradient function and print out text with the given colors(or choose a preset gradient):
Preset Color
const text = "hello world"
const gradient = text2gradient('fire', text);
console.log(gradient)
Custom Colors
const text = "hello world"
const gradient = text2gradient(['#ff0000', '#00ff00', '#0000ff'], text);
console.log(gradient)
Example
Here's an example of how you can use the text2gradient module to make text colorful:
Preset Color
const text2gradient = require('text2gradient');
const text = "hello world"
const gradient = text2gradient('fire', text);
console.log(gradient)
Custom Colors
const text2gradient = require('text2gradient');
const text = "hello world"
const gradient = text2gradient(['#ff0000', '#00ff00', '#0000ff'], text);
console.log(gradient)
Preset Gradients
sunset
pastel
magic
fire
rastafari
ocean
summerdog
argon
terminal
dawn
lunada
combi
hazel
stripe
netflix
instagram
carlo
royalpetrol
mermariani
More will come soon