My code is correct but the Test won't work

Tell us what’s happening:
I used rgb colors to replace hex colors and checked solution but the test keeps asking for rgb but it is already there. This is the Basic CSS: Use RGB to Mix Colors challange https://www.freecodecamp.org/learn/responsive-web-design/basic-css/use-rgb-to-mix-colors

code

<style>
  .red-text {
    color: rgb(255, 0, 0)
  }
  .orchid-text {
    color: rgb(218, 112, 214)
  }
  .sienna-text {
    color: rgb(160, 82, 45)
  }
  .blue-text {
    color: rgb(0, 0, 255)  }
</style>

Hello and welcome to the freeCodeCamp community~!

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).


If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Thanks new here…I checked the videos and the program works but the test won’t pass…not sure what to do.

Hi,

Semicolons ‘;’ are missing at the end of every instruction in the color classes!

3 Likes

Thank you will try that…next time I will format properly…

Tell us what’s happening:
I made an additional post hopefully doing it correctly!
keep getting errors but have followed instruction and the colors are correct.

Your code so far


<style>
.red-text {
  color: rgb(255, 0, 0)
}
.orchid-text {
  color: rgb(218, 112, 214)
}
.sienna-text {
  color: rgb(160, 82, 45)
}
.blue-text {
  color: rgb(0, 0, 255)
}
</style>

<h1 class="red-text">I am red!</h1>

<h1 class="orchid-text">I am orchid!</h1>

<h1 class="sienna-text">I am sienna!</h1>

<h1 class="blue-text">I am blue!</h1>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36.

Challenge: Use RGB to Mix Colors

Link to the challenge:

@anon10857827 is correct. You need to add semicolons inside of your CSS at the end of each line like below

  h2 {
    color: red;
  }
1 Like

I am confused. I was replacing hex colors with rgb colors in the style element. That is all it asked for and the colors are correct. Do I change all the h elements using the code you provided?

No. I’m sorry if I was confusing with my example.

You have typed the correct rgb(...) but you have not added a semicolon to the end of the line.

Each line in each style rule must end in a semicolon in the freeCodeCamp editor for your tests to pass.

1 Like

Thank you…I will try it now. So appreciative.

1 Like

It was perfect…I spent so much time on this…didn’t understand where the semi colon went. Thanks so much. Now that I have an answer am I supposed to do anything with this post?

2 Likes

We don’t have any special process for closing posts or anything.

Huzzah for you getting your code working!

1 Like

As @JeremyLT said, we don’t necessarily close posts after solving them.

However, if a particular reply helped you reach the solution, it is good to mark that reply as the solution with this button:
image

This lets other users who might be having a similar issue quickly find the information that can help. :slight_smile:

1 Like

Thanks to your help…I really appreciate it!!!

1 Like
<style>

  .red-text {

    color: rgb(255, 0, 0);

  }

  .orchid-text {

    color: rgb(218, 112, 214);

  }

  .sienna-text {

    color: rgb(160, 82, 45);

  }

  .blue-text {

    color: rgb(0, 0, 255);

  }

</style>

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Thank you for understanding.

You should place semicolons, " ;"
color: rgb(255, 0, 0);