CSS Color Codes

When you want to set a color for your text or any other HTML element you will most likely need CSS Color Codes.

You can specify CSS Color Codes in 3 ways:

1. Setting the CSS Color by Color name
You can use any of these 16 colors: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.

Example:
<span style=”color:red;”>Sample text</span>
Output:
Sample text

2. Setting CSS Color Code by Color RGB Value
Since we’re limited by 16 CSS color names, the better way to find the exact color we want is by specifying its CSS RGB value. RGB stands for ‘Red Green Blue’, so if you want to set a red color you will set red to maximum, and green and blue to zero. Maximum value for a color is 255, so the value would look like rgb(255,0,0).

Example:
<span style=”color:rgb(255,0,0);”>Sample text</span>
Output:
Sample text

3. Setting CSS Color Code by Color Hex Value
The better way yet to set CSS Color Codes is to enter the CSS color hex value. For instance, color name ‘red’ has a hex value of ‘#FF0000′.
You can use our css color wheel to find hex value of any color.

Example:
<span style=”color:#FF0000;”>Sample text</span>
Output:
Sample text

Here is our CSS Color Wheel, happy coding!

Technorati Tags:

Bookmark this article! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • blogmarks
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • BlinkList
  • Furl
  • IndianPad
  • LinkaGoGo
  • Ma.gnolia

10 Responses to “CSS Color Codes”

  1. Devia Says:

    Pretty useful post, thanks.

  2. Sandy Says:

    Thanks. This will be useful.

  3. Cassidy Says:

    Nice. Thanks. I really like the color wheel — whatever it doesn’t matter. Anyway, I found this helpful! Thanks!

  4. ushno Says:

    Very helpful resource. Thank you very much.

  5. Muhammad Saeed Says:

    It solved my problem, May all related people live long with health & continuous prosperity.

  6. Dehmers Says:

    Hello

    My life,vist it http://juhuadress.blogetery.com/ ,Thanks.

  7. ghesrker Says:

    Hello

    My life,vist it http://www.fotolode.com/nblogs.php ,Thanks.

  8. btelles Says:

    Great One

    I want to know what song/music they play when the PA Announcer announces the starting lineup for the VISITING team at Celtics games. There are no words, it’s just music and it has been the same for years. I don’t want to know anything about the Celti…

  9. "teen bondage Says:

    “lesbian bondage

    Local BDSM Club Make Sure You Keep These Things in Mind:”

  10. "bedroom bondage Says:

    “bondage sex

    BDSM Particular Adverts - How to Do Them the Correct Way:.”

Leave a Reply