Project

color_wave

0.0
No commit activity in last 3 years
No release in over 3 years
Create a colored wave of characters in your terminal.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 10.0

Runtime

>= 0
~> 2.1.0
~> 2.1.2
~> 0.3.0
 Project Readme

ColorWave

Creates a color-cycling wave of characters in the terminal. All-in-all pretty useless.

Installation

Add this line to your application's Gemfile:

gem 'color_wave'

And then execute:

$ bundle

Or install it yourself as:

$ gem install color_wave

Usage

You can run it from the command line with or without some options:

$ color_wave --lines 20 --cycles 3 --speed 10.0

The above values are the defaults.

Options
  • --lines - the height of the wave in terminal lines
  • --cycles - how many cycles of the wave will be drawn
  • --speed - used as the divisor of the delay time between drawing loops; use higher values for faster redrawing
  • --help - show usage information

You can use it in Ruby too:

require 'color_wave'

ColorWave.new(lines: 10, cycles: 2, speed: 1, colors: %w( ff0000 00ff00 0000ff ), chars: %w( _ / ^ \ )).run

The speed option is used as the divisor to a BASE_SLEEP_TIME constant so higher speeds will redraw the wave more quickly. The colors and chars options specify the colors and characters to be cycled through when drawing the wave.

Ctrl-C will stop it once it's running.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jbratton/color_wave. This project is intended to be a safe, welcoming space for collaboration and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.