HTML Color Names
Modern browsers support 140 named colors which are listed below. Use them in your HTML and CSS by name, Hex color code or RGB value.
IndianRed
LightCoral
Salmon
DarkSalmon
LightSalmon
Crimson
Red
FireBrick
DarkRed
Pink
LightPink
HotPink
DeepPink
MediumVioletRed
PaleVioletRed
LightSalmon
Coral
Tomato
OrangeRed
DarkOrange
Orange
Gold
Yellow
LightYellow
LemonChiffon
LightGoldenrodYellow
PapayaWhip
Lavender
Thistle
Plum
Violet
Orchid
Fuchsia
Magenta
MediumOrchid
MediumPurple
BlueViolet
DarkViolet
DarkOrchid
DarkMagenta
Purple
Indigo
SlateBlue
DarkSlateBlue
GreenYellow
Chartreuse
LawnGreen
Lime
LimeGreen
PaleGreen
LightGreen
MediumSpringGreen
SpringGreen
MediumSeaGreen
SeaGreen
ForestGreen
Green
DarkGreen
YellowGreen
OliveDrab
Olive
DarkOliveGreen
MediumAquamarine
DarkSeaGreen
LightSeaGreen
DarkCyan
Teal
Aqua
Cyan
LightCyan
PaleTurquoise
Aquamarine
Turquoise
MediumTurquoise
DarkTurquoise
CadetBlue
SteelBlue
LightSteelBlue
PowderBlue
LightBlue
SkyBlue
LightSkyBlue
DeepSkyBlue
DodgerBlue
CornflowerBlue
MediumSlateBlue
RoyalBlue
Blue
MediumBlue
DarkBlue
Navy
MidnightBlue
Cornsilk
BlanchedAlmond
Bisque
NavajoWhite
Wheat
BurlyWood
Tan
RosyBrown
SandyBrown
Goldenrod
DarkGoldenrod
Peru
Chocolate
SaddleBrown
Sienna
Brown
Maroon
White
Snow
Honeydew
MintCream
Azure
AliceBlue
GhostWhite
WhiteSmoke
Seashell
Beige
OldLace
FloralWhite
Ivory
AntiqueWhite
Linen
LavenderBlush
MistyRose
Gainsboro
LightGray
Silver
DarkGray
Gray
DimGray
LightSlateGray
SlateGray
DarkSlateGray
Black
Jump to Color Group
Understanding HTML Color Names
HTML color names provide a convenient way to specify colors in your web projects without memorizing hex codes or RGB values. Modern browsers support 140 standard color names that can be used directly in your HTML and CSS.
Quick Tip:
Color names are not case-sensitive in CSS. For example, darkblue
, DarkBlue
, and DARKBLUE
all refer to the same color.
History of Named Colors in Web Development
The concept of named colors dates back to the early days of the web. The original specification included just 16 basic colors. Over time, this list expanded to include more colors, culminating in the 140 named colors supported in modern browsers today.
The 16 original HTML colors were: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. These colors were chosen to work reliably across all browser and system configurations.
Benefits of Using Named Colors
Readability
Color names are more intuitive and easier to remember than hex codes or RGB values, making your code more readable and understandable.
Efficiency
For common colors, names can be shorter and more concise than their hex or RGB equivalents, potentially reducing file size.
Semantics
Names add meaning to your code, making it more understandable for other developers and enhancing code maintenance.
How to Use Named Colors in Your Code
In HTML:
<div style="color: indianred">This text is Indian Red</div>
<p style="background-color: lightblue">This paragraph has a Light Blue background</p>
In CSS:
.danger {
color: red;
}
.info-box {
background-color: lightcyan;
border: 1px solid navy;
}
Color Names vs. Hex Codes and RGB Values
While named colors are convenient, they are limited to the 140 predefined colors. For more precise color selection, you may need to use hex codes or RGB values. Each approach has its place in web development:
- Named colors: Best for rapid prototyping and when exact color matching isn't critical
- Hex codes: Offer a wide range of colors and are widely used in web design
- RGB values: Provide precise control and support transparency with RGBA
For more precise color control, you might want to use our Color Picker tool or check out the Color Chart to find the perfect color for your project.
Frequently Asked Questions About Color Names
Are CSS color names case-sensitive?
No, CSS color names are not case-sensitive. You can write them in lowercase, uppercase, or mixed case. For example, lightblue
, LightBlue
, and LIGHTBLUE
all refer to the same color in CSS and HTML.
How many named colors are supported in modern browsers?
Modern browsers support 140 standard named colors. These include the original 16 HTML colors plus additional colors that were added in CSS specifications. All of these named colors are supported across all major browsers including Chrome, Firefox, Safari, and Edge.
When should I use named colors instead of hex codes?
Named colors are ideal for rapid prototyping, educational purposes, or when working with common colors where exact matching isn't critical. They make code more readable and are easier to remember. However, for precise brand colors, custom designs, or when you need colors outside the 140 named options, hex codes or RGB values provide more flexibility.
Can I use color names in all CSS properties?
Yes, you can use color names in any CSS property that accepts a color value. This includes properties likecolor
, background-color
, border-color
, box-shadow
,outline-color
, and gradient functions like linear-gradient()
. Color names work anywhere a hex code or RGB value would work.