Help: Exercise :Adjust the Hue of a Color

Tell us what’s happening:
Describe your issue in detail here.
Hi everybody
I need help in this exercise :slight_smile: https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/adjust-the-hue-of-a-color

My answers are all correct, except at this point.
The div element with class green should have a background-color of green.
why the :slight_smile:
.green {
background-color: hsl(120, 100 %, 50 %);
background-color:green;
}
give me error?
Your code so far


<style>
body {
  background-color: #FFFFFF;
}

.green {
  background-color: hsl(120, 100 %, 50 %);
  background-color:green;
}

.cyan {
  background-color: hsl(180, 100 %, 50 %);
  background-color:cyan;
}

.blue {
  background-color: hsl(240, 100 %, 50 %);
  background-color:blue;
}

div {
  display: inline-block;
  height: 100px;
  width: 100px;
}
</style>

<div class="green"></div>
<div class="cyan"></div>
<div class="blue"></div>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36

Challenge: Adjust the Hue of a Color

Link to the challenge:

The instructions said:

Change the background-color

You have added to the list. And worst, the second one overrides so your solution doesn’t work.

Here:

.blue {
  background-color: hsl(240, 100 %, 50 %);
  background-color:blue;
}

There should be only one, the one you added, the first one.

So, remove those three lines, one in each class.

Next, you have a space between the number and the “%” - that seems to be breaking things. So, instead of “100 %”, it should be “100%”.

When I make those changes, your code passes for me.

And of course you don’t have dark mode on - that can screw up color tests.

Hi Kevin: Thanks!
This is the correct code!!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.