Simple gem for taking an RGB colour string, and converting it into a human-friendly name.
Install the gem and add to the application's Gemfile by executing:
bundle add human_colourIf bundler is not being used to manage dependencies, install the gem by executing:
gem install human_colour require "human_colour"
HumanColour.parse("rgb(128,64,0)")
#=> "brown"
HumanColour.parse("rgb(30, 20, 10)")
#=> "near black"
# Return a colour based on the provided locale (:de, :en, :es, :fr, :it, :pt)
HumanColour.parse("rgb(128,64,0)", locale: :es)
#=> "marrón"
HumanColour.parse("rgb(255, 128, 255", locale: :de)
#=> "hell lila"After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
The gem is available as open source under the terms of the MIT License.
