There is a build-in function for this: https://reference.wolfram.com/language/ref/RGBColor.html
Oops, I didn't see that. Thanks!