crolorama

Easy text coloring and styling in Crystal. Currently only support for systems with ANSI support.

Tested only on Linux.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      crolorama:
        github: simplylu/crolorama
  2. Run shards install

Usage

require "crolorama"
crol = Crolorama::Color.new

puts "This is #{crol.fg("red")}RED#{crol.reset}"

Available methods

Experimental

Example: crystal run src/example.cr

Available colors: crystal run src/colors.cr

Development

This shard is mainly oriented towards the colorama module of python. In case you wanna add new features, see Contributing.

Contributing

  1. Fork it (https://github.com/simplylu/crolorama/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors