String2color

The String2color gem takes extends the Ruby String class and turns a string into a random RGB color. Since RGB has three values, naturally the string must be three characters or longer to work.

Installation

Add this line to your application's Gemfile:

gem 'string2color'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install string2color

Usage

'foobar'.to_color #=> RGB(54, 111, 102)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/djackreuter/string2color.

License

The gem is available as open source under the terms of the MIT License.