i am looking for code to validate html color codes. wanna check if user typed valid color code, can you guyz help ?
i know i need that regex stuff but i cant understand a think about that regex things :S
thanks
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 can match hexadecimal colors like this:
Note that this wont handle names or
rgb(n, n, n).You can match
rgb(x, y, z)colors like this:Note that this will match
rgb(299, 299, 299).