Closed unm4sk1g closed 7 years ago
Also, credits to Tim Down from StackOverflow for the function.
Thanks for the PR. I'll look into that soon. Alternative would be to use a package tinyColor2 which provides a lightweight a general approach to color code conversion. Personally, I'd prefer that rather than adding helpers which are not used by the package itself.
Also, credits to Tim Down from StackOverflow for the function.
For reference: https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
Even though tinyColor2 is very useful for this kind of stuff, since we have lots of conversion people already use by helper.js, this one shouldn't be a big of a deal, don't know why @coveralls hates me :joy:
@msunjic98 wrote
Even though tinyColor2 is very useful for this kind of stuff, since we have lots of conversion people already use by helper.js, this one shouldn't be a big of a deal ...
Ok, fair enough.
don't know why @coveralls hates me
That is, because you did not write unit tests for the new function. Coverage is measured on execution of all unit tests.
Forgot about this. Added unit test for the new function.
Thanks! Much appreciated
Takes the 6-digit hex code for colors (eg. #FFFFFF). Might be useful to someone, I didn't see it in the library, if it exists ignore this pull request, otherwise, could be a nice addition to the current converting functions.