In the code snippet shared in this exercise the border has a color of `rgb(22, 77, 100)`. I have never seen color represented in this way before. What does it mean?


#1

Question

In the code snippet shared in this exercise the border has a color of rgb(22, 77, 100). I have never seen color represented in this way before. What does it mean?

Answer

This representation allows developers to specify a numeric value for red, green and blue color components. Each color component can be specified with a value between 0-255. This means that this scheme allows us to represent 256 * 256 *256 = 6,777,216 different colors!

You will learn more about the 4 different ways of representing color in CSS in unit 4.