gradientty

Version, currently 1.1.02 versions

github.com/GalactHD/gradientty

A Simple, customizable and lightweight gradient text to console.

4 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  gradientty:
    github: GalactHD/gradientty
    version: ~> 1.1.0

Then run:

shards install

shard.yml

Crystal
>= 1.17.1
License
MIT
Author
GalactHD

Dependencies

This version declares no dependencies.

README

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      gradientty:
        github: galacthd/gradientty
  2. Run shards install

Usage

require "gradientty"

# Some colors are based on gradient-string, a typescript/javascript library.

# Minimalist gradient based on Crystal Language.
puts Gradientty.crystal("Hello Crystal!")

# Classic rainbow gradient.
puts Gradientty.rainbow("Hello Rainbow!")

# Soft pastel gradient
puts Gradientty.pastel("Hello Pastel!")

# Vice-style gradient
puts Gradientty.vice("Hello Vice!")

# Custom gradient: any colors you want
custom = Gradientty.gradient(["#ff69b4", "#8a2be2", "#1e90ff"])
puts custom.multiline("Hello\nCustom Gradient!", true) # continuous across lines

License

MIT © GalactHD