https://github.com/ddosnotification/cli-gradient
Add smooth gradient effects to your command line text, without any external dependencies. This pure JavaScript utility allows you to easily apply custom color gradients to terminal output, making it more visually appealing and dynamic.
https://github.com/ddosnotification/cli-gradient
cli color-gradient console-text-effects console-utility terminal-customization terminal-styling
Last synced: 4 months ago
JSON representation
Add smooth gradient effects to your command line text, without any external dependencies. This pure JavaScript utility allows you to easily apply custom color gradients to terminal output, making it more visually appealing and dynamic.
- Host: GitHub
- URL: https://github.com/ddosnotification/cli-gradient
- Owner: ddosnotification
- Created: 2024-11-26T19:11:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-26T19:19:56.000Z (over 1 year ago)
- Last Synced: 2025-10-24T14:55:43.289Z (8 months ago)
- Topics: cli, color-gradient, console-text-effects, console-utility, terminal-customization, terminal-styling
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/cli-gradient
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
cli-gradient
Add smooth gradient effects to your command line text, without any external dependencies.
## Features
- **Gradient Text**: Easily apply custom color gradients to your terminal output.
- **Pure JavaScript**: No external dependencies, just a lightweight, self-contained solution.
- **Configurable Gradients**: Specify your own start and end colors to create unique gradients.
- **Cross-Platform**: Works seamlessly on Windows, macOS, and Linux terminals.
## Installation
Install the package using npm:
```
npm install cli-gradient-pure
```
## Usage
Import the `gradientText` function and use it to apply gradient effects to your text:
```javascript
const { gradientText } = require('cli-gradient-pure');
console.log(gradientText('Hello, World!', { from: '#ff0000', to: '#0000ff' }));
```
This will output the text "Hello, World!" with a smooth red-to-blue gradient.
## Options
The `gradientText` function accepts the following options:
| Option | Type | Description |
| --- | --- | --- |
| `from` | string | The starting color of the gradient (hex, rgb, or named color) |
| `to` | string | The ending color of the gradient (hex, rgb, or named color) |
## Contributing
If you find any issues or have suggestions for improvement, feel free to open a new issue or submit a pull request.
## Note
- This project is just for my personal usage, if you want to support me you can give it a star on github
- If you want something to add or fix you can contact me on twitter (@ddosntfcion)