lndl / colorputs

Color in p and puts method!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colorputs

Color in p and puts method!

Description

Colorputs provides a beatiful color (and format) printing for Ruby console-based applications

Instalation

gem install colorputs

Examples of usage

p 'Hello world!', :red

Will print out "Hello world!" colored in red.

p 'Hello world!', :_bl

Will print out a blinking "Hello world!".

In addition, it's possible to combine both color and mode (for now, only one of each) and if some of them are mispelled, Colorputs will try to parse the another part if this one is well-spelled. Examples:

p 'Hello world!', :blue_u

Will print out an underlined "Hello world!" colored in blue.

p 'Hello world!', :wrong_r

Will not print out the "Hello world!" message colored, but reversed. Same behavior in the opposite case (correct color, wrong format mode)

Availables colors

SymbolColor
:redRed
:blueBlue
:greenGreen
:yellowYellow
:cyanCyan
:magentaMagenta
:whiteWhite
:blackBlack
:rainbowRainbow colors!

Availables modes

SymbolMode
:_bBold
:_uUnderlined
:_blBlinked
:_rReversed

Contributing

  1. Fork it.
  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 new Pull Request.

About

Color in p and puts method!

License:MIT License


Languages

Language:Ruby 100.0%