color-printer

Version, currently master branch1 version
  • master branchlatestJun 11, 2016

github.com/jwoertink/color-printer

Add color to your terminal with Crystal

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  color-printer:
    github: jwoertink/color-printer
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
MIT
Author
Jeremy Woertink

Dependencies

This version declares no dependencies.

README

color-printer

puts some color in your terminal

Installation

Add this to your application's shard.yml:

dependencies:
  color-printer:
    github: jwoertink/color-printer

Usage

require "color-printer"

puts({:green, "Hello World"})

Because Crystal supports method overloading, your original puts still works the same.

NOTE

After writing this, I learned that Crystal has built in coloring using colorize, and I also came across Chalk Box which aims to do the same thing, but better, and more complete than this. I don't really expect people to want to use this, it's more for learning the language.

Development

Things left to add

  • Add in background-colors
  • Maybe write a spec or two

Contributing

  1. Fork it ( https://github.com/jwoertink/color-printer/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