How do I convert a Hex color to and RGB color using T-SQL
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
https://data.stackexchange.com/stackoverflow/query/4803/so3087921
There’s a generic function at https://dpatrickcaldwell.blogspot.com/2009/05/converting-hexadecimal-or-binary-to.html
I generally avoid scalar functions if at all possible, since it is possible to lure yourself into thinking that it’s OK to call a scalar UDF for 5 million rows without any penalty over the inline expression.
You can also use an inline table-valued UDF: