Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Guardfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 string-irc.gemspec


String::IRC is a module to IRC-friendlily colorize text.


Add this line to your application's Gemfile:

gem 'string-irc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install string-irc


Use String::IRC module

require 'string/irc'

Strint::IRC.colorize 'Hello', :white, :red
#=> Text whose foreground color is white and background color is red

Strint::IRC.colorize 'Hello', :red
#=> Text whose foreground color is red and background color is not designated

Strint::IRC.colorize 'Hello', nil, :red
#=> Nothing changes.

Strint::IRC.bold 'Hello'
#=> Makes the text bold.

Strint::IRC.underline 'Hello'
#=> Makes the text underlined.

Strint::IRC.italic 'Hello'
#=> Makes the text italic.

Use String extension

require 'string/irc/core_ext/string'

'Hello'.irc_colorize :white, :red
#=> Same as above.

#=> Same as above.

#=> Same as above.

#=> Same as above.

Supported Colors

  • white
  • black
  • blue
  • navy
  • green
  • red
  • brown
  • maroon
  • purple
  • orange
  • olive
  • yellow
  • light
  • green
  • lime
  • teal
  • light_cyan
  • cyan
  • aqua
  • light_blue
  • royal
  • pink
  • light_purple
  • fuchsia
  • grey
  • light_grey
  • silver

See Also


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.