Skip to Main Content
homepage homepage

Images: Color Codes

Color Codes

What is an HTML Color Code?

What is a HTML color code?

A HTML color code is an identifier used to represent a color on the web. Color codes are ways of representing the colors we see everyday in a format that a computer can interpret and display. Commonly used in websites and other software applications, there are a variety of formats. The two that will be introduced here are the Hex Color Codes, and the RGB color codes.

RGB Color

A color in the RGB color model is described by indicating how much of each of the red, green, and blue is included. The color is expressed as an RGB triplet (r,g,b), each component of which can vary from zero to a defined maximum value. If all the components are at zero the result is black; if all are at maximum, the result is the brightest representable white.

In computers, the component values are often stored as integer numbers in the range 0 to 255, the range that a single 8-bit byte can offer. 

RGB color table

Basic colors:

Color HTML / CSS Name Hex Code


Decimal Code


  Black #000000 (0,0,0)
  White #FFFFFF (255,255,255)
  Red #FF0000 (255,0,0)
  Lime #00FF00 (0,255,0)
  Blue #0000FF (0,0,255)
  Yellow #FFFF00 (255,255,0)
  Cyan / Aqua #00FFFF (0,255,255)
  Magenta / Fuchsia #FF00FF (255,0,255)
  Silver #C0C0C0 (192,192,192)
  Gray #808080 (128,128,128)
  Maroon #800000 (128,0,0)
  Olive #808000 (128,128,0)
  Green #008000 (0,128,0)
  Purple #800080 (128,0,128)
  Teal #008080 (0,128,128)
  Navy #000080 (0,0,128)


Hex Code Values

0  --- lowest intensity, #000000 equals blackest black 8 --- #888888 equals a little darker midtone gray
--- #111111 equals black, but not as black as all 0s 9 --- #999999 equals a little darker midtone gray
2  --- #222222 equals a lighter black A --- #AAAAAA equals darker midtone gray
3 --- #333333 equals a real dark gray B --- #BBBBBB equals a more midtone gray
4 --- #444444 equals a little darker gray C --- #CCCCCC equals a light gray
5 --- #555555 equals a little darker gray D --- #DDDDDD equals a real light gray
6 --- #666666 equals a darker gray E --- #EEEEEE equals a real light gray, almost white
7 --- #777777 equals a still darker gray F --- #FFFFFF, all Fs equal pure white, highest intensity 

All the possible hex color code number combinations gives 16,777,216 possible colors.

Hex Color Codes


The most popular are Hex color codes; three byte hexadecimal numbers (meaning they consist of six digits), with each byte, or pair of characters in the Hex code, representing the intensity of red, green and blue in the color respectively.


Hex code byte values range from 00, which is the lowest intensity of a color, to FF which represents the highest intensity. The color white, for example, is made by mixing each of the three primary colors at their full intensity, resulting in the Hex color code of #FFFFFF.


Black, the absence of any color on a screen display, is the complete opposite, with each color displayed at their lowest possible intensity and a Hex color code of #000000.


Understanding the basics of Hex color code notation we can create grayscale colors very easily, since they consist of equal intensities of each color:




The three primary colors, red, green and blue, are made by mixing the highest intensity of the desired color with the lowest intensities of the other two:







With modern browsers supporting the full spectrum of 24-bit color, there are 16,777,216 different color possibilities. Use our color picker to explore all 16.7 million of them, or if that’s too many, check out our color charts for a selection of palettes focused on flat design, Material design and web safe colors.



Information above from; HTML Color Codes

Color Codes

HTML color codes and names