gradientty

A Simple, customizable and lightweight gradient text to console.
1.1.0 Latest release released

Gradientty logo

GitHub release

A simple, customizable, and lightweight gradient text library for the console, inspired by gradient-string.

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

gradientty:
  github: galacthd/gradientty
  version: ~> 1.1.0
License MIT
Crystal >= 1.17.1

Dependencies 0

Development Dependencies 0

Dependents 1

Last synced .
search fire star recently