Is that possible to map a color to a color name like below:
light blue = #FF8000
The orginal color for this hex value #FF8000 is light orange
I need to map this value #FF8000 to light blue
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.
Simple answer: No it’s not possible. The html-colornames are bound to a fixed Hex-value as defined in the Specification. The browsers automatically convert keywords like
lightblueto this specific Hex-value (or RGB but that doesn’t matter). You cannot change this behaviour.Although you could use your own color-words like
lightBlueand parse the stylesheets via javascript and apply the colors according to your own definitions.Alternatively you can work with variables in SASS/LESS if that’s what you want.
And btw, Simple question: WHY?