How can I convert RGB values into HTML code?
For example, using values like this:
red:0
blue:0
green:0
html color code = #000000
Is there any formula for converting it?
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.
You just need to convert each component value to its corresponding hex representation, and concatenate them into a string, like:
Example: http://jsfiddle.net/5TdXJ/2