![Build Status] (https://travis-ci.org/kamok/hexcode-generator.svg?branch=master)
This gem gives you random HEX codes. 1 out of 16,777,216 possible combinations, repeatable, in #RRGGBB notation.
Add this line to your application's Gemfile:
gem 'hex_code_generator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hex_code_generator
HexGenerator.new_hex
=> "#2e2f1d"
HexGenerator.new_hex
=> "#46ece5"
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 tags, and push the .gem
file to rubygems.org.
Just some ideas:
-
Make it so colors of the similar hues (red, yellow, etc) don't appear consecuetively, or can only repeat after 3 hex values.
-
Make it so colors that appeared once will never appear again.
Bug reports and pull requests are welcome on GitHub at https://github.com/mokk083/hex_code_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.