Exercise: Using colours

Adjust the numbers used in the colours of the second and third paragraphs so that the first and second paragraph match and the third and fourth paragraph match. Do not change the colours of the first and fourth paragraphs.

Note:

Hints:

  • undefined

Solution to the exercise

To make the second paragraph the same colour as the first paragraph, we needed to translate hexadecimal A0 into decimal, that is 10 times 16, or 160.

To make the third paragraph the same colour as the fourth paragraph, we needed to translate decimal 255 and 128 to hexadecimal. We already know that 255 is FF in hexadecimal. To calculate 128, we determine the quotient and remainder (8 and 0) to obtain 80 in hexadecimal.

Note:

Hints:

  • undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
.first {
    color#A000A0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX