0.0
No commit activity in last 3 years
No release in over 3 years
Change string into a random RGB color value
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0
 Project Readme

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.