Day 1. Rgb2Hex
Rgb2Hex
is a ruby gem which lets you quickly convert RGB value of a color to its HEX value.
Install
Gem is hosted on RubyGems.org. To install the gem enter the following command:
>> gem install rgb2hex
Usage
Rgb2Hex
expects 3 integer values between 0 and 255 each separated by a space. It produces a HEX value prefixed with #
. Rgb2Hex
gem comes with a binary, which allows the gem to be used from the console.
>> rgb2hex 255 0 144 # magenta
=> #ff0090