A Node.js library for creating beautiful color gradients in terminal output.
gradient-string is a Node.js library that generates and applies color gradients to text output in the terminal. It solves the problem of dull, monochromatic console displays by allowing developers to create vibrant, gradient-colored strings for CLI tools, logs, and ASCII art. The library supports a wide range of color formats and offers built-in gradients for quick use.
Node.js developers building CLI applications, tools, or scripts who want to enhance terminal output with visually appealing color gradients. It's also useful for creators of ASCII art or interactive terminal games.
Developers choose gradient-string for its simplicity, flexibility, and aesthetic results. Unlike basic terminal coloring libraries, it provides smooth gradient transitions, multi-line support, and advanced customization options like HSV interpolation, making it a go-to for polished terminal interfaces.
:rainbow: Beautiful color gradients in terminal output
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports hex codes, RGB/HSV objects, CSS strings, and named colors via TinyColor integration, as shown in the initialization examples with multiple formats.
Includes ready-to-use gradients like rainbow and pastel for quick, attractive outputs without configuration, demonstrated in the built-in gradients section.
The multiline() method applies consistent horizontal gradients across each line, ideal for ASCII art and formatted logs, with examples provided.
Offers fine-grained control with custom color stop positions and choice between RGB or HSV interpolation, detailed in the advanced gradients section.
Built on chalk for terminal coloring, it only works in Node.js environments with ANSI support, making it unsuitable for web or server-side rendering without a terminal.
The library is designed for horizontal text gradients; there's no built-in functionality for vertical or angled gradients without custom work, as noted in the multi-line focus.
Adds dependencies on chalk and tinygradient, which might introduce unnecessary bloat for projects only needing basic terminal coloring or minimal dependencies.