Skip to content

clampcorder/hex2rgb-challenge-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages