RGB Color Format


The RGB color format or color space builds the colors from a combination of red, green and blue. Each of these color values defines the intensity of the color as an integer value from 0 to 255.

As RGB is a combination of red, green and blue and each of these can have a value in the range of 0 to 255, it makes 16777216 possible colors. The value 255 stands for 100 percent intensity for the color value, so an RGB color of 0, 255, 0 would describe green.

CSS Example

To use a RGB color in CSS the following format needs to be used rgb(RED, GREEN, BLUE);. RGB colors are supported by all browsers.

div {
  background-color: rgb(0, 22, 100);
  color: rgb(255, 255, 255);
}

125x125 Fiverr Pro  Grammarly Logo    10% discount- Jump- start your career  Searchmetrics Essentials - try for free

Advertisment: These links are affiliate (commission) links. If you click on such a link and buy something on that website, I get a commission. For you, the price does not change.