ku1ik / rainbow

Ruby gem for colorizing printed text on ANSI terminals
MIT License
813 stars 68 forks source link

Add hexadecimal RGB triplet string format check #83

Closed chiting closed 6 years ago

chiting commented 6 years ago

This PR adds a format check when the user inputs a string, addressing the issue #82.

Please note that I'm still not sure enforcing an ArgumentError is the best solution because some people could be using a non valid hexadecimal string in their project without any visible impact (i.e 'green') and that change could potentially break their code.

ku1ik commented 6 years ago

Looks good to me! Thanks @chiting 👍