Skip to content

bobf/paintbrush

Repository files navigation

Paintbrush

Simple and concise string colorization for Ruby without overloading String methods or requiring verbose class/method invocation.

Paintbrush has zero dependencies and does not pollute any namespaces or objects outside of the #paintbrush method wherever you include the Paintbrush module.

Nesting is supported, allowing you to use multiple colors within the same string. The previous color is automatically restored.

include Paintbrush
puts paintbrush { purple "You used #{green 'four'} #{blue "(#{cyan '4'})"} #{yellow 'colors'} today!" }

example

Installation

Add Paintbrush to your Gemfile:

gem 'paintbrush'

Build your bundle:

bundle install

Documentation

See the Official Documentation for examples and configuration options.

License

Paintbrush is released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors