Learn CSS Colors by Building a Set of Colored Markers - Step 46

Tell us what’s happening:

In the .green class selector, set the background-color property to a hex color code with the values 00 for red, FF for green, and 00 blue.
i wrote a code like this-
.green{background-color: (rgb #00FF00);

but it keeps telling me… your .green CSS rule should the background-color property set to #00FF00

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Colored Markers</title>
    <link rel="stylesheet" href="styles.css">
    <h1>CSS Color Markers</h1>
    <div class="container">
      <div class="marker red">
      <div class="marker green">
      <div class="marker blue">
/* file: styles.css */
h1 {
  text-align: center;

.container {
  background-color: rgb(255, 255, 255);
  padding: 10px 0;

.marker {
  width: 200px;
  height: 25px;
  margin: 10px auto;

.red {
  background-color: rgb(255, 0, 0);

/* User Editable Region */

  background-color: (rgb #00FF00)

/* User Editable Region */

.blue {
  background-color: rgb(0, 0, 0);

Your browser information:

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

Challenge Information:

Learn CSS Colors by Building a Set of Colored Markers - Step 46

1 Like

Hi there and welcome to our community!

Hex codes and rgb are two different methods for applying a colour.

Hex codes are hexadecimal representations of red, green and blue colour values and have the syntax #RRGGBB (each pair of letters represent a hexadecimal value). As each digit can have 16 possible values, the value for each colour channel has 256 (i.e. 16x16) possible values.

The rgb scheme is a different syntax for representing the same sets of values, with the syntax rgb(r, g, b), where the letters r, g and b are each numerical values from 0 to 255.


// hex code for blue
body {
 background-color: #0000FF;

// equivalent rgb value
body {
 background-color: rgb(0, 0, 255);

Just remove your rgb from the code and the parenthesis.

1 Like

thank you sir… it actually work