Project

hex_to_rgb

0.0
No commit activity in last 3 years
No release in over 3 years
Convert hexadecimal colors to their RGB values.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 3.0.0, ~> 3.0
 Project Readme

HexToRgb

Gem Version

Turn a hexadecimal color into its corresponding RGB, decimal values!

Install

gem install hex_to_rgb

Usage

require 'hex_to_rgb'

hex_to_rgb = HexToRgb.new("#ABC")

hex_to_rgb.rgb #=> [170, 187, 204]
hex_to_rgb.r   #=> 170
hex_to_rgb.g   #=> 187
hex_to_rgb.b   #=> 204

Related Gem

RgbToHexColor - Convert rgb colors into hex colors.

Development

Install

gem install --dev hex_to_rgb

Specs

The default Rake task is to run the specs.

rake

License

MIT