Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to state colors in HTML?

Some people spell the color out, others use # followed by three or six numbers. Which method is the best for high efficiency.

I personally use #XXXXXX but am starting to wonder if there are better alternatives.

Update:

Any ideas about the difference between #XXX and #XXXXXXX then?

4 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    The colors spelled out must be among the Web Safe colors or you will wind up not getting the color you want. The hex color value is the best way to go in most cases. The #XXX is only used for those colors whose hex color number pairs are repeating:

    #000000 = #000

    #ffffff = #fff

    #777777 = #777 and so on.

    HTML 4.01 & CSS2 Colors - Named Colors: http://paynelessdesigns.com/tools/tool_colors_name...

    Websafe and Really Safe Palettes: http://paynelessdesigns.com/tools/tool_colors_webs...

    Ron

  • 1 decade ago

    If by "spell the color out" you mean things like "blue", it is recommended NOT to do that, as there are about a hundred different "spelled out" color words (e.g., "linen", "honeysuckle", "wheat", etc.), and the different browsers sometimes interpret the words differently.

    You're fine using the hash-hex numbers.

    Source(s): EDIT: These are the "spelled out" color names, according to W3Schools: http://www.w3schools.com/html/html_colornames.asp Try picking one of the colors, then click the "Shades" or "Mix" links.
  • Anonymous
    1 decade ago

    xxxxxx will give a wider range of colors. its also the normal way of writing it.

Still have questions? Get your answers by asking now.