Skip to content

GalactHD/gradientty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Simple, customizable and lightweight gradient text to console.

Resources

License

Stars

Watchers

Forks

Packages

No packages published