Skip to content

djackreuter/string2color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Ruby Gem that takes a string and transforms it into a random RGB color value. Part of EMR curriculum

Resources

License

Stars

Watchers

Forks

Packages

No packages published