Log in

View Full Version : css color name



ravi951
08-04-2011, 04:40 AM
hi all,
i want to know the name of the colors used in css.please give the name of the color for the below ones......using words likr red,green....etc

#ccc-
#aaa-
#000-
#333-

djr33
08-04-2011, 05:06 AM
Not every hexadecimal color has a name.
Here's a list:
http://www.w3schools.com/cssref/css_colornames.asp

Note that your examples above are three characters and the technically correct format is six. For example, #CCC is equivalent to #CCCCCC. (Each character is duplicated. #123 would be #112233.)


For the future, please search for your answer before posting. That link took me 5 seconds to find, on google searching for "CSS color names".


I don't know if all of those color terms are always compatible in every browser, so I recommend using the hexadecimal code (6 characters is best).


Also, as a specific answer to your question, according to that list only #000 (equivalent to #000000) has a name: "black". The others don't have names. There are other similar shades of gray, however, if that's what you are looking for. See the link for more information. Or just use the hexadecimal values you have.