Learn

There is another syntax for representing RGB values, commonly referred to as “RGB value” or just “RGB”, that uses decimal numbers rather than hexadecimal numbers, and it looks like this:

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

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 RGB 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 RGB to RGB.

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).

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?