Skip to Content
Learn
CSS Color
RGB Colors

There is another syntax for representing RGB values that uses decimal numbers. It looks like this:

h1 { color: rgb(23, 45, 23); }

Here, each of the three values represents a color component, and each can have a decimal number value from 0 to 255. The first number represents the amount of red, the second is green, and the third is blue. These colors are exactly the same as hex, but with a different syntax and a different number system.

In general, hex and decimal color representations are equivalent. Which you choose is a matter of personal taste. That said, it’s good to choose one and be consistent throughout your CSS, because it’s easier to compare hex to hex and decimal to decimal.

Instructions

1.

In style.css, find the hex value #8FBC8F and change it to rgb(143, 188, 143).

2.

In style.css, find the hex value #A0522D and change it to rgb(160, 82, 45).

3.

In style.css, find the hex value #8B4513 and change it to rgb(139, 69, 19).

Folder Icon

Take this course for free

Already have an account?