HTML Color Codes

Find the best HTML color codes for use in your projects using the color picker, color charts, color names, color from image and color groups pages.


Basic HTML color codes

Display Name Hexadecimal RGB
black #000000 rgb(0,0,0)
silver #c0c0c0 rgb(192,192,192)
gray #808080 rgb(128,128,128)
white #ffffff rgb(255,255,255)
maroon #800000 rgb(128,0,0)
red #ff0000 rgb(255,0,0)
purple #800080 rgb(128,0,128)
fuchsia #ff00ff rgb(255,0,255)
green #008000 rgb(0,128,0)
lime #00ff00 rgb(0,255,0)
olive #808000 rgb(128,128,0)
yellow #ffff00 rgb(255,255,0)
navy #000080 rgb(0,0,128)
blue #0000ff rgb(0,0,255)
teal #008080 rgb(0,128,128)
aqua #00ffff rgb(0,255,255)

To see a wider selection, refer to the HTML Color Names section.

What is a HTML color code?

A HTML color code is an identifier used to represent a color on the web. Common forms of these codes are as a keyword name, a hexadecimal value, a RGB (red, green, blue) triplet, and a HSL (hue, saturation, lightness) triplet. Each form allows a choice of 16,777,216 colors.

For example, the color red can be identifier using the following formats:

  • red (keyword name)
  • #ff0000 (hex)
  • (255,0,0) (RGB)
  • (0, 100%, 50%) (HSL)

Because there are so many colors to choose from, tools have been created to make the task of selection much simpler. A color picker allows a user to select a color by clicking on visual range of color to pin-point an exact code. A color chart provides a listing of common colors for quick selection.

To use a selected color code within your webpage, you could place the following attribute within a given element to change its background color to red:

style="background-color: #ff0000;"

HTML color codes are used within HTML and CSS to create web design color schemes. They are primarily used by web designers, graphic designers, computer programmers, and digital illustrators. Choosing the correct web colors can be exhausting, but it is a great skill to have, especially for marketing purposes.

To read more about html colors, Wikipedia has a good resource on web colors: