Method: RGB.hex_to_rgb
- Defined in:
- lib/color/rgb.rb
.hex_to_rgb(hex_color) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/color/rgb.rb', line 7 def self.hex_to_rgb(hex_color) hex_color = Hex.fill_hex_color(hex_color) if hex_color.length == 4 # Length 4 => #aac [hex_to_dec(hex_color[1..2]), hex_to_dec(hex_color[3..4]), hex_to_dec(hex_color[5..6])] end |