HTML Color Codes


The Different Rainbows of Colors on the Internet

Color Creation

The most comon way, for webpages, that colors are created is by using hexadecimal characters as representations for the values of the colors. These are essentially "light values", and define the strength or weakness of the absense or presense of light: it all depends on whether or not you're a half-full or half-empty type of person. "00" Represents the darkest of colors, and in itself is black. "FF" is white.

Hexidecimal Colors Explained

Before you can understand Hex colors, you must understand what a Hexidecimal character is, as well as the value or weight it might represent. If you are familiar with root-words: Hex means 6 and Dec means 10. 6 + 10 equals 16. The hexidecimal system has 16 characters: 0123456789ABCDEF. I'm sure you have played poker, solitaire, or another card game before. Letters in the Hex system works just like playing a card game: Letters are worth more: A=10, B=11, C=12, D=13, E=14, F=15. Just in case you are confused, thinking "But if F equals 15, and you said Hex+Dec=16..", you might be forgetting about "0", zero is a number too.

The Hexidecimal Color system could also be explained as being a math system of equating what values equal what colors. Every different 6-character hex combination is a completely different color. Since we are talking about 16 different values that fill 6 different locations, there are 16^6 total combinations (16^6 = 16,777,216). As you will learn about "216 Web Safe Colors" below, some monitors or operating systems can only display 216 or 256 colors, some can only display 16,386, some can display the full 16+ million.

Hexidecimal colors consist of 6 characters, 3 sets of 2. Red, Green, and Blue comprise each of the sets. You probably learned that Red, Yellow, and Blue are the three primary colors, when you were younger. Well, that may apply to crayons and paint, but not light. In the internet-hexidecimal-light world, to get "Yellow" without referencing it as "Yellow", you have to mix the strongest Red ("FF"), strongest Green ("FF"), and weakest Blue ("00"). This would be: "FF" + "FF" + "00", or "FFFF00".

In a 6 character hex-color, each set of the 3 sets of 2 color definitions has 256 combinations (16 x 16). RR+GG+BB of red, green, blue, is how hex colors are defined.

RGB Colors: They are the same as Hex colors

To convert a RGB color to a Hex color, or Hex to RGB, is very easy to do. In a hex color, the first character of each set of 2 characters is the strongest, it has a multiplier of 16. The second character has a multiplier of 1, so its value really doesnt 'change'. For our example, FF306C is a neon pink color. Its RGB numeric value is 255+48+108. ([16x15+15][16x3+0][16x6+12]). Remember, "F" has a value of 15, "C" equals 12... RGB colors are not meant to be used in regular html, such as in font colors, background colors, border colors, etc. RGB is typically used in JavaScript, C++, and other C-languages. Always use regular color names or hex colors to satisfy your html color codes cravings.


Web Safe Colors

In the 1990's, most computers and internet browsers only supported, were only capable of displaying, 256 different color combinations. Even earlier, there were only 16 colors availible. Even earlier, there were only two: Typically Black(background) and Green(foreground/text) or Black(background) and White/Gray(foreground/text).

The availible 256 colors were not the exact same 256 colors from one computer operating system to another. Because of this, the decision was made to have colors standardized. In the computer and internet world, standardizing practices is very important. These standardized colors were known as the 216 Web Safe Colors. The main reason behind doing this was so that all computers would be able to display the same colors. If a "non-safe color" was attempted to be displayed on a computer that could not display that specific color, the color would usually display as the next closest 16-color or 216-color. For example: #4488EE would probably actually be displayed as #3399FF or #0000FF (but these are just my opinionated-guesses, its been a long time since I have worked with such an old computer)

Today, it is not as important to use these "Web Safe Colors" because with the current operating systems, and the olders versions that have been availible for many years, millions and millions of colors can be displayed. However, computers and operating systems that are still affected by this 256 color restriction, are still used today. From my understanding, these old computers are mostly used in 3rd world countries, poor schools, and anyone else associated with "poverty level income". I have no statistics to back this up though.

One last mention: You don't have to use Hex colors for everything. You can also use web named colors. However, these are pretty much your only two options of naming or creating colors when it comes to html. Here are a few examples just to make sure you know what I mean.

<body bgcolor="maroon"> versus <body bgcolor="#800000>

<font color="teal"> versus <font color="#008080">

<table bordercolor="deepskyblue"> versus <table bordercolor="#00BFFF">

<hr color="blue"> versus <hr color="#0000FF">



16 Color Names

- The standardized 16 supported color names are: Aqua, Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal, White, Yellow
Aqua Black Blue Fuchsia Gray Green Lime Maroon
Navy Olive Purple Red Silver Teal White Yellow


216 Web Safe Colors Chart

000000 000033 000066 000099 0000CC 0000FF
003300 003333 003366 003399 0033CC 0033FF
006600 006633 006666 006699 0066CC 0066FF
009900 009933 009966 009999 0099CC 0099FF
00CC00 00CC33 00CC66 00CC99 00CCCC 00CCFF
00FF00 00FF33 00FF66 00FF99 00FFCC 00FFFF
330000 330033 330066 330099 3300CC 3300FF
333300 333333 333366 333399 3333CC 3333FF
336600 336633 336666 336699 3366CC 3366FF
339900 339933 339966 339999 3399CC 3399FF
33CC00 33CC33 33CC66 33CC99 33CCCC 33CCFF
33FF00 33FF33 33FF66 33FF99 33FFCC 33FFFF
660000 660033 660066 660099 6600CC 6600FF
663300 663333 663366 663399 6633CC 6633FF
666600 666633 666666 666699 6666CC 6666FF
669900 669933 669966 669999 6699CC 6699FF
66CC00 66CC33 66CC66 66CC99 66CCCC 66CCFF
66FF00 66FF33 66FF66 66FF99 66FFCC 66FFFF
990000 990033 990066 990099 9900CC 9900FF
993300 993333 993366 993399 9933CC 9933FF
996600 996633 996666 996699 9966CC 9966FF
999900 999933 999966 999999 9999CC 9999FF
99CC00 99CC33 99CC66 99CC99 99CCCC 99CCFF
99FF00 99FF33 99FF66 99FF99 99FFCC 99FFFF
CC0000 CC0033 CC0066 CC0099 CC00CC CC00FF
CC3300 CC3333 CC3366 CC3399 CC33CC CC33FF
CC6600 CC6633 CC6666 CC6699 CC66CC CC66FF
CC9900 CC9933 CC9966 CC9999 CC99CC CC99FF
CCCC00 CCCC33 CCCC66 CCCC99 CCCCCC CCCCFF
CCFF00 CCFF33 CCFF66 CCFF99 CCFFCC CCFFFF
FF0000 FF0033 FF0066 FF0099 FF00CC FF00FF
FF3300 FF3333 FF3366 FF3399 FF33CC FF33FF
FF6600 FF6633 FF6666 FF6699 FF66CC FF66FF
FF9900 FF9933 FF9966 FF9999 FF99CC FF99FF
FFCC00 FFCC33 FFCC66 FFCC99 FFCCCC FFCCFF
FFFF00 FFFF33 FFFF66 FFFF99 FFFFCC FFFFFF


Web Named Colors: HTML Color Chart

 steelblue  steelblue  steelblue 4682B4
 royalblue  royalblue  royalblue 041690
 cornflowerblue  cornflowerblue  cornflowerblue 6495ED
 lightsteelblue  lightsteelblue  lightsteelblue B0C4DE
 mediumslateblue  mediumslateblue  mediumslateblue 7B68EE
 slateblue  slateblue  slateblue 6A5ACD
 darkslateblue  darkslateblue  darkslateblue 483D8B
 midnightblue  midnightblue  midnightblue 191970
 navy  navy  navy 000080
 darkblue  darkblue  darkblue 00008B
 mediumblue  mediumblue  mediumblue 0000CD
 blue  blue  blue 0000FF
 dodgerblue  dodgerblue  dodgerblue 1E90FF
 deepskyblue  deepskyblue  deepskyblue 00BFFF
 lightskyblue  lightskyblue  lightskyblue 87CEFA
 skyblue  skyblue  skyblue 87CEEB
 lightblue  lightblue  lightblue ADD8E6
 powderblue  powderblue  powderblue B0E0E6
 azure  azure  azure F0FFFF
 lightcyan  lightcyan  lightcyan E0FFFF
 paleturquoise  paleturquoise  paleturquoise AFEEEE
 mediumturquoise  mediumturquoise  mediumturquoise 48D1CC
 lightseagreen  lightseagreen  lightseagreen 20B2AA
 darkcyan  darkcyan  darkcyan 008B8B
 teal  teal  teal 008080
 cadetblue  cadetblue  cadetblue 5F9EA0
 darkturquoise  darkturquoise  darkturquoise 00CED1
 aqua  aqua  aqua 00FFFF
 cyan  cyan  cyan 00FFFF
 turquoise  turquoise  turquoise 40E0D0
 aquamarine  aquamarine  aquamarine 7FFFD4
 mediumaquamarine  mediumaquamarine  mediumaquamarine 66CDAA
 darkseagreen  darkseagreen  darkseagreen 8FBC8F
 mediumseagreen  mediumseagreen  mediumseagreen 3CB371
 seagreen  seagreen  seagreen 2E8B57
 darkgreen  darkgreen  darkgreen 006400
 green  green  green 008000
 forestgreen  forestgreen  forestgreen 228B22
 limegreen  limegreen  limegreen 32CD32
 lime  lime  lime 00FF00
 chartreuse  chartreuse  chartreuse 7FFF00
 lawngreen  lawngreen  lawngreen 7CFC00
 greenyellow  greenyellow  greenyellow ADFF2F
 yellowgreen  yellowgreen  yellowgreen 9ACD32
 palegreen  palegreen  palegreen 98FB98
 lightgreen  lightgreen  lightgreen 90EE90
 springgreen  springgreen  springgreen 00FF7F
 mediumspringgreen  mediumspringgreen  mediumspringgreen 00FA9A
 darkolivegreen  darkolivegreen  darkolivegreen 556B2F
 olivedrab  olivedrab  olivedrab 6B8E23
 olive  olive  olive 808000
 darkkhaki  darkkhaki  darkkhaki BDB76B
 darkgoldenrod  darkgoldenrod  darkgoldenrod B8860B
 goldenrod  goldenrod  goldenrod DAA520
 gold  gold  gold FFD700
 yellow  yellow  yellow FFFF00
 khaki  khaki  khaki F0E68C
 palegoldenrod  palegoldenrod  palegoldenrod EEE8AA
 blanchedalmond  blanchedalmond  blanchedalmond FFEBCD
 moccasin  moccasin  moccasin FFE4B5
 wheat  wheat  wheat F5DEB3
 navajowhite  navajowhite  navajowhite FFDEAD
 burlywood  burlywood  burlywood DEB887
 tan  tan  tan D2B48C
 rosybrown  rosybrown  rosybrown BC8F8F
 sienna  sienna  sienna A0522D
 saddlebrown  saddlebrown  saddlebrown 8B4513
 chocolate  chocolate  chocolate D2691E
 peru  peru  peru CD853F
 sandybrown  sandybrown  sandybrown F4A460
 darkred  darkred  darkred 8B0000
 maroon  maroon  maroon 800000
 brown  brown  brown A52A2A
 firebrick  firebrick  firebrick B22222
 indianred  indianred  indianred CD5C5C
 lightcoral  lightcoral  lightcoral F08080
 salmon  salmon  salmon FA8072
 darksalmon  darksalmon  darksalmon E9967A
 lightsalmon  lightsalmon  lightsalmon FFA07A
 coral  coral  coral FF7F50
 tomato  tomato  tomato FF6347
 darkorange  darkorange  darkorange FF8C00
 orange  orange  orange FFA500
 orangered  orangered  orangered FF4500
 crimson  crimson  crimson DC143C
 red  red  red FF0000
 deeppink  deeppink  deeppink FF1493
 fuchsia  fuchsia  fuchsia FF00FF
 magenta  magenta  magenta FF00FF
 hotpink  hotpink  hotpink FF69B4
 lightpink  lightpink  lightpink FFB6C1
 pink  pink  pink FFC0CB
 palevioletred  palevioletred  palevioletred DB7093
 mediumvioletred  mediumvioletred  mediumvioletred C71585
 purple  purple  purple 800080
 darkmagenta  darkmagenta  darkmagenta 8B008B
 mediumpurple  mediumpurple  mediumpurple 9370DB
 blueviolet  blueviolet  blueviolet 8A2BE2
 indigo  indigo  indigo 4B0082
 darkviolet  darkviolet  darkviolet 9400D3
 darkorchid  darkorchid  darkorchid 9932CC
 mediumorchid  mediumorchid  mediumorchid BA55D3
 orchid  orchid  orchid DA70D6
 violet  violet  violet EE82EE
 plum  plum  plum DDA0DD
 thistle  thistle  thistle D8BFD8
 lavender  lavender  lavender E6E6FA
 ghostwhite  ghostwhite  ghostwhite F8F8FF
 aliceblue  aliceblue  aliceblue F0F8FF
 mintcream  mintcream  mintcream F5FFFA
 honeydew  honeydew  honeydew F0FFF0
 lightgoldenrodyellow  lightgoldenrodyellow  lightgoldenrodyellow FAFAD2
 lemonchiffon  lemonchiffon  lemonchiffon FFFACD
 cornsilk  cornsilk  cornsilk FFF8DC
 lightyellow  lightyellow  lightyellow FFFFE0
 ivory  ivory  ivory FFFFF0
 floralwhite  floralwhite  floralwhite FFFAF0
 linen  linen  linen FAF0E6
 oldlace  oldlace  oldlace FDF5E6
 antiquewhite  antiquewhite  antiquewhite FAEBD7
 bisque  bisque  bisque FFE4C4
 peachpuff  peachpuff  peachpuff FFDAB9
 papayawhip  papayawhip  papayawhip FFEFD5
 beige  beige  beige F5F5DC
 seashell  seashell  seashell FFF5EE
 lavenderblush  lavenderblush  lavenderblush FFF0F5
 mistyrose  mistyrose  mistyrose FFE4E1
 snow  snow  snow FFFAFA
 white  white  white FFFFFF
 whitesmoke  whitesmoke  whitesmoke F5F5F5
 gainsboro  gainsboro  gainsboro DCDCDC
 lightgrey  lightgrey  lightgrey D3D3D3
 silver  silver  silver C0C0C0
 darkgray  darkgray  darkgray A9A9A9
 gray  gray  gray 808080
 lightslategray  lightslategray  lightslategray 778899
 slategray  slategray  slategray 708090
 dimgray  dimgray  dimgray 696969
 darkslategray  darkslategray  darkslategray 2F4F4F
 black  black  black 000000