HTML color codes are composed of hexadecimal triplets that are
represented by red, green and blue (rgb) colors. For example, the color
code for red is FF0000 which means “255” red, “0” green and “0” blue.
Major hexadecimal color codes:
FFF
FFF |
CCC
CCC |
999
999 |
666
666 |
333
333 |
000
000 |
FFC
C00 |
FF9
900 |
FF6
600 |
FF3
300 |
|
99C
C00 |
|
CC9
900 |
FFC
C33 |
FFC
C66 |
FF9
966 |
FF6
633 |
CC3
300 |
|
CC0
033 |
CCF
F00 |
CCF
F33 |
333
300 |
666
600 |
999
900 |
CCC
C00 |
FFF
F00 |
CC9
933 |
CC6
633 |
330
000 |
660
000 |
990
000 |
CC0
000 |
FF0
000 |
FF3
366 |
FF0
033 |
99F
F00 |
CCF
F66 |
99C
C33 |
666
633 |
999
933 |
CCC
C33 |
FFF
F33 |
996
600 |
993
300 |
663
333 |
993
333 |
CC3
333 |
FF3
333 |
CC3
366 |
FF6
699 |
FF0
066 |
66F
F00 |
99F
F66 |
66C
C33 |
669
900 |
999
966 |
CCC
C66 |
FFF
F66 |
996
633 |
663
300 |
996
666 |
CC6
666 |
FF6
666 |
990
033 |
CC3
399 |
FF6
6CC |
FF0
099 |
33F
F00 |
66F
F33 |
339
900 |
66C
C00 |
99F
F33 |
CCC
C99 |
FFF
F99 |
CC9
966 |
CC6
600 |
CC9
999 |
FF9
999 |
FF3
399 |
CC0
066 |
990
066 |
FF3
3CC |
FF0
0CC |
00C
C00 |
33C
C00 |
336
600 |
669
933 |
99C
C66 |
CCF
F99 |
FFF
FCC |
FFC
C99 |
FF9
933 |
FFC
CCC |
FF9
9CC |
CC6
699 |
993
366 |
660
033 |
CC0
099 |
330
033 |
33C
C33 |
66C
C66 |
00F
F00 |
33F
F33 |
66F
F66 |
99F
F99 |
CCF
FCC |
|
CC9
9CC |
996
699 |
993
399 |
990
099 |
663
366 |
660
066 |
006
600 |
336
633 |
009
900 |
339
933 |
669
966 |
99C
C99 |
|
FFC
CFF |
FF9
9FF |
FF6
6FF |
FF3
3FF |
FF0
0FF |
CC6
6CC |
CC3
3CC |
003
300 |
00C
C33 |
006
633 |
339
966 |
66C
C99 |
99F
FCC |
CCF
FFF |
339
9FF |
99C
CFF |
CCC
CFF |
CC9
9FF |
996
6CC |
663
399 |
330
066 |
990
0CC |
CC0
0CC |
00F
F33 |
33F
F66 |
009
933 |
00C
C66 |
33F
F99 |
99F
FFF |
99C
CCC |
006
6CC |
669
9CC |
999
9FF |
999
9CC |
993
3FF |
660
0CC |
660
099 |
CC3
3FF |
CC0
0FF |
00F
F66 |
66F
F99 |
33C
C66 |
009
966 |
66F
FFF |
66C
CCC |
669
999 |
003
366 |
336
699 |
666
6FF |
666
6CC |
666
699 |
330
099 |
993
3CC |
CC6
6FF |
990
0FF |
00F
F99 |
66F
FCC |
33C
C99 |
33F
FFF |
33C
CCC |
339
999 |
336
666 |
006
699 |
003
399 |
333
3FF |
333
3CC |
333
399 |
333
366 |
663
3CC |
996
6FF |
660
0FF |
00F
FCC |
33F
FCC |
00F
FFF |
00C
CCC |
009
999 |
006
666 |
003
333 |
339
9CC |
336
6CC |
000
0FF |
000
0CC |
000
099 |
000
066 |
000
033 |
663
3FF |
330
0FF |
00C
C99 |
|
009
9CC |
33C
CFF |
66C
CFF |
669
9FF |
336
6FF |
003
3CC |
|
330
0CC |
|
00C
CFF |
009
9FF |
006
6FF |
003
3FF |
|
The color samples in the tables below are not images; they are generated by the HTML of this page. Colors can be produced for a number of page elements using the color names or RGB hexadecimal codes indicated in each of the samples.The use of HTML elements and attributes for specifying color is deprecated. You are encouraged to use css instead.
Of interest to UT Web authors/designers:
the University of Texas at Austin Visual Guidelines shows #CC5500
as offical "UT burnt orange." It may not appear so on
your screen; the wide disparity in color calibration among computer
monitors makes it difficult to predict how accurately color will
be rendered across the Web. It is best simply to specify the appropriate
color and not worry too much how the result will appear on a given
monitor (including your own!). In the future, support for the sRGB (Standard Default color Space for the Internet) and
ICC color profiles should reduce this problem.
These 16 colors can be specified by name in
HTML 4. The color names are case sensitive. So, for example, you could use either "#000000" or "Black" to refer to the color black.
| Color |
|
|
|
|
|
|
|
|
| Name |
Aqua |
Black |
Blue |
Fuchsia |
Gray |
Green |
Lime |
Maroon |
| RGB |
#00FFFF |
#000000 |
#0000FF |
#FF00FF |
#808080 |
#008000 |
#00FF00 |
#800000 |
| Color |
|
|
|
|
|
|
|
|
| Name |
Navy |
Olive |
Purple |
Red |
Silver |
Teal |
White |
Yellow |
| RGB |
#000080 |
#808000 |
#800080 |
#FF0000 |
#C0C0C0 |
#008080 |
#FFFFFF |
#FFFF00 |
Colors may also be specified by six-character codes
representing
their relative red/green/blue (RGB) values, where the
possible values
for each color component are 00 to FF. 00 represent the
least amount of the color present and FF represents the most of that
color present. The first two bytes indicate the amount of red, the
second two bytes represent the amount of green and the last two bytes
represent the amount of blue.
Hex Value
| Red |
Green |
Blue |
| 00 |
00 |
00 |
Here are some simple examples:
- Red = #FF0000
- Green = #00FF00
- Blue = #0000FF
- Cyan (blue and green) = #00FFFF
- Magenta (red and blue) = #FF00FF
- Yellow (red and green) = #FFFF00
The number of possible colors represented by this system is 256 * 256 * 256 = 16.777,216
The six charts below display the 216 possible colors in the Netscape/MSIE
palette with their hexadecimal RGB codes (a seventh
chart displays the gray scale). In each chart the blue value
is constant, the vertical axis represents increasing red values,
and the horizontal axis represents increasing green values.
The six charts can be visualized as a cube composed of 216 cubelets;
the total cube has six layers of thirty-six cubelets; each cubelet
is a unique color. Using this metaphor, black (#000000) in the lower
left of the first chart is one corner of the cube and white (#ffffff)
in the upper right of the last chart is the opposite corner of the
cube; the cubelets running through the body of the cube in a line
from black to white comprise the gray scale.
1 of 6
|
where blue=00 |
| where red= |
FF |
FF0000 Red |
FF3300 Red(Orange)
|
ff6600 |
ff9900 |
FFCC00 Gold |
FFFF00 Yellow |
| cc |
cc0000 |
cc3300 |
cc6600 |
cc9900 |
cccc00 |
ccff00 |
| 99 |
990000 |
993300 |
996600 |
999900 |
99cc00 |
99ff00 |
| 66 |
660000 |
663300 |
666600 |
669900 |
66cc00 |
66ff00 |
| 33 |
330000 |
333300 |
336600 |
339900 |
33cc00 |
33ff00 |
| 00 |
000000 Black |
003300 |
006600 |
009900 |
00cc00 |
00FF00 Lime |
|
00 |
33 |
66 |
99 |
cc |
FF |
|
where green= |
2 of 6
|
where blue=33 |
| where red= |
ff |
ff0033 |
ff3333 |
ff6633 |
ff9933 |
ffcc33 |
ffff33 |
| cc |
cc0033 |
cc3333 |
cc6633 |
cc9933 |
cccc33 |
ccff33 |
| 99 |
990033 |
993333 |
996633 |
999933 |
99cc33 |
99ff33 |
| 66 |
660033 |
663333 |
666633 |
669933 |
66cc33 |
66ff33 |
| 33 |
330033 |
333333 |
336633 |
339933 |
33cc33 |
33ff33 |
| 00 |
000033 |
003333 |
006633 |
009933 |
00cc33 |
00ff33 |
|
00 |
33 |
66 |
99 |
cc |
ff |
|
where green= |
3 of 6
|
where blue=66 |
| where red= |
ff |
ff0066 |
ff3366 |
ff6666 |
ff9966 |
ffcc66 |
ffff66 |
| cc |
cc0066 |
cc3366 |
cc6666 |
cc9966 |
cccc66 |
ccff66 |
| 99 |
990066 |
993366 |
996666 |
999966 |
99cc66 |
99ff66 |
| 66 |
660066 |
663366 |
666666 |
669966 |
66cc66 |
66ff66 |
| 33 |
330066 |
333366 |
336666 |
339966 |
33cc66 |
33ff66 |
| 00 |
000066 |
003366 |
006666 |
009966 |
00cc66 |
00ff66 |
|
00 |
33 |
66 |
99 |
cc |
ff |
|
where green= |
4 of 6
|
where blue=99 |
| where red= |
ff |
ff0099 |
ff3399 |
ff6699 |
ff9999 |
ffcc99 |
ffff99 |
| cc |
cc0099 |
cc3399 |
cc6699 |
cc9999 |
cccc99 |
ccff99 |
| 99 |
990099 |
993399 |
996699 |
999999 |
99cc99 |
99ff99 |
| 66 |
660099 |
663399 |
666699 |
669999 |
66cc99 |
66ff99 |
| 33 |
330099 |
333399 |
336699 |
339999 |
33cc99 |
33ff99 |
| 00 |
000099 |
003399 |
006699 |
009999 |
00cc99 |
00ff99 |
|
00 |
33 |
66 |
99 |
cc |
ff |
|
where green= |
5 of 6
|
where blue=cc |
| where red= |
ff |
ff00cc |
ff33cc |
ff66cc |
ff99cc |
ffcccc |
ffffcc |
| cc |
cc00cc |
cc33cc |
cc66cc |
cc99cc |
cccccc |
ccffcc |
| 99 |
9900cc |
9933cc |
9966cc |
9999cc |
99cccc |
99ffcc |
| 66 |
6600cc |
6633cc |
6666cc |
6699cc |
66cccc |
66ffcc |
| 33 |
3300cc |
3333cc |
3366cc |
3399cc |
33cccc |
33ffcc |
| 00 |
0000cc |
0033cc |
0066cc |
0099cc |
00cccc |
00ffcc |
|
00 |
33 |
66 |
99 |
cc |
ff |
|
where green= |
6 of 6
|
where blue=ff |
| where red= |
ff |
ff00ff |
ff33ff |
ff66ff |
ff99ff |
ffccff |
ffffff |
| cc |
cc00ff |
cc33ff |
cc66ff |
cc99ff |
ccccff |
ccffff |
| 99 |
9900ff |
9933ff |
9966ff |
9999ff |
99ccff |
99ffff |
| 66 |
6600ff |
6633ff |
6666ff |
6699ff |
66ccff |
66ffff |
| 33 |
3300ff |
3333ff |
3366ff |
3399ff |
33ccff |
33ffff |
| 00 |
0000ff |
0033ff |
0066ff |
0099ff |
00ccff |
00ffff Aqua |
|
00 |
33 |
66 |
99 |
cc |
ff |
|
where green= |
If one of the following attributes is used,
they all should be specified in order to avoid color conflicts;
for example, you may assign a background color and a visitor may
have his/her browser set to display text in the same color, making
your page unreadable. All these attributes should be specified
in a single tag.
-
- sets the background color for the page as a whole.
-
- sets the text color for the page as a whole.
-
- sets the unvisited link color for the page as a whole.
-
- sets the visited link color for the page as a whole.
-
- sets the activated link color (i.e. the color of the link as
users click on it) for the page as a whole.
- sample
text
- sets the color of selected text within a page.
Although the following attributes are not included in the
HTML 3.2
specification for
,
| , and
| elements, they are included in the HTML
4.0 proposal and have been supported by Netscape
since version 3.0 and by Internet
Explorer since version 2.0.
- sets the background color for an entire table.
- sets the background color for one header cell within a table.
| - sets the background color for one data cell within a table.
|
|