|
|
|
Conversion of Numerical Color Codes to Hex Color Codes Enhancing your HTML pages to incorporate colored backgrounds, text, table cells, links, etc., can make a huge difference to the appeal of your web site. A user is more likely to stay on your site longer if they are visually pleased by its format. Of course, if you use colors poorly, users will evacuate quicker than if you had stayed with the default colors used by your browser. So, choose your colors carefully. Soft, muted colors look a far sight better than brash, bold colors. I am constantly being repulsed away from sites using chartreuse, orange and bright yellow as their primary colors. Gross! The codes for the colors you can use are based on hexidecimal, or HEX, code. All of the color codes used by HTML 3.0 specification are six digits. Each group of two represents a primary color. The first two digits represent RED, the middle two represent GREEN, and the last two represent BLUE. In order to get a color such as red, the HEX code would be FF0000. The first two digits represented by "FF" means that red is fully saturated, while both GREEN and BLUE, which is set as "00", denotes no addition of these two color elements. It is kind of like adding color to a can of white paint. In order to get a particular color, you will have to add a certain number of parts of one of these three primary colors. The chart below shows the hexidecimal equivalents to color terms that you might see associated to an image you are working on in most graphics programs. |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | ||
| 0 | 000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 | 008 | 009 | 010 | 011 | 012 | 013 | 014 | 015 | 0 |
| 1 | 016 | 017 | 018 | 019 | 020 | 021 | 022 | 023 | 024 | 025 | 026 | 027 | 028 | 029 | 030 | 031 | 1 |
| 2 | 032 | 033 | 034 | 035 | 036 | 037 | 038 | 039 | 040 | 041 | 042 | 043 | 044 | 045 | 046 | 047 | 2 |
| 3 | 048 | 049 | 050 | 051 | 052 | 053 | 054 | 055 | 056 | 057 | 058 | 059 | 060 | 061 | 062 | 063 | 3 |
| 4 | 064 | 065 | 066 | 067 | 068 | 069 | 070 | 071 | 072 | 073 | 074 | 075 | 076 | 077 | 078 | 079 | 4 |
| 5 | 080 | 081 | 082 | 083 | 084 | 085 | 086 | 087 | 088 | 089 | 090 | 091 | 092 | 093 | 094 | 095 | 5 |
| 6 | 096 | 097 | 098 | 099 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 6 |
| 7 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 7 |
| 8 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 8 |
| 9 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 9 |
| A | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | A |
| B | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | B |
| C | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | C |
| D | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | D |
| E | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | E |
| F | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | F |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|
The table above is used as follows: a typical color code might be
"052 179 084." To translate this to hexidecimal, take the first of the
three sets, "052", and find 052 on the table. The column to the left is
used as the first Hex character and the top or bottom row is used for
the second Hex character--34 is your answer. The 179 translates in the
same manner as b3. The third as 54. You have a hex value for the color
you want as 34b354. It seems that it is much easier to find the numerical code for the colors in most graphics software today, so this chart should be helpful. JASC uses numerical codes in Paint Shop Pro to identify colors within an image. So does Photoshop from Adobe. My familiarity with other graphics programs is limited but I suspect they all use the same principles. Just a few of the nearly 16.8 million possible colors! |
|
Description1 |
Hex Color |
Red |
Green |
Blue |
Color (appearance on web) |
|
|---|---|---|---|---|---|---|
| red | FF0000 | 255 | 000 | 000 | ||
| lime | 00FF00 | 000 | 255 | 000 | ||
| blue | 0000FF | 000 | 000 | 255 | ||
| white | FFFFFF | 255 | 255 | 255 | ||
| black | 000000 | 000 | 000 | 000 | ||
| deepskyblue | 00BFFF | 000 | 191 | 255 | ||
| green | 008000 | 000 | 050 | 000 | ||
| darkorange | FF8C00 | 255 | 140 | 000 | ||
| cornflowerblue | 6495ED | 100 | 149 | 237 | ||
| khaki | F0E68C | 240 | 230 | 140 | ||
| teal | 008080 | 000 | 050 | 050 | ||
| palegreen | 98FB98 | 152 | 251 | 152 | ||
| pink | FFC0CB | 255 | 192 | 203 | ||
| slategray | 708090 | 112 | 128 | 144 | ||
| peru | CD853F | 205 | 133 | 063 | ||
| aqua | 00FFFF | 000 | 255 | 255 | ||
| burlywood | DEB887 | 222 | 184 | 135 | ||
| aliceblue | F0F8FF | 240 | 248 | 255 | ||
| lemonchiffon | FFFACD | 255 | 250 | 205 | ||
| indigo | 4B0082 | 075 | 000 | 130 | ||
| crimson | DC143C | 220 | 020 | 060 | ||
| magenta | FF00FF | 255 | 000 | 255 | ||
| chocolate | D2691E | 210 | 105 | 030 | ||
| forestgreen | 228B22 | 034 | 139 | 034 | ||
| darkgray | A9A9A9 | 169 | 169 | 169 | ||
| lightgoldenrodyellow | FAFAD2 | 250 | 250 | 210 | ||
| firebrick | B22222 | 178 | 034 | 034 | ||
| lavendar | E6E6FA | 230 | 230 | 250 | ||
| lightcoral | F08080 | 240 | 128 | 128 | ||
| mediumspringgreen | 00FA9A | 000 | 250 | 154 | ||
| thistle | D8BFD8 | 216 | 191 | 216 | ||
| sienna | A0522D | 160 | 082 | 045 | ||
| palegoldenrod | EEE8AA | 238 | 232 | 170 | ||
| mediumpurple | 9370D8 | 147 | 112 | 216 | ||
| royalblue | 4169E1 | 065 | 105 | 225 | ||
| orange | FFA500 | 255 | 165 | 000 | ||
| tan | D2B48C | 210 | 180 | 140 | ||
| plum | DDA0DD | 221 | 160 | 221 | ||
| olive | 808000 | 128 | 128 | 000 | ||
| yellowgreen | 9ACD32 | 154 | 205 | 050 | ||
| seashell | FFF5EE | 255 | 245 | 238 | ||
| navajowhite | FFDEAD | 255 | 222 | 173 | ||
| palevioletred | D87093 | 216 | 112 | 147 | ||
| silver | C0C0C0 | 192 | 192 | 192 | ||
| rosybrown | BC8F8F | 188 | 143 | 143 |
|
This last chart represents just some of the colors that are available and, as a
side note, you can use the name in the first column instead of a hexidecimal
code to get the color you want. This will, however, limit your color use as not
all colors will be represented with a special name. I hope you find this helpful! |

|
|
This page, and all contents, are © B&L Associates, Bangor, Maine, U.S.A. All Rights Reserved. |