Hex to rgb conversion helpers

This is a short challenge to create first a function that can take a hexidecimal colour code like #01050f and return a ruby map with the RGB values such as {r: 1, g: 5, b: 15}.

.. and then to use that to build a class that can convert both ways around :)

Tests

The tests for this are written in rspec. Your goal is to have all tests passing when running rspec from the root of the project.

Checkout the test file to see what is expected. Note that we only test the 'happy path', and only 6 digit codes (even though 3 digit codes are valid in CSS).

Where to get help

You can use any reference you wish, here are some links that have been useful to others:

Tips

Test often, have fun