Learn CSS Colors by Building a Set of Colored Markers

Step 21

There are two main color models: the additive RGB (red, green, blue) model used in electronic devices, and the subtractive CMYK (cyan, magenta, yellow, black) model used in print.

In this project, you’ll work with the RGB model. This means that colors begin as black, and change as different levels of red, green, and blue are introduced. An easy way to see this is with the CSS rgb function.

Create a new CSS rule that targets the class container and set its background-color to black with rgb(0, 0, 0).

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

I don’t see anything missing here, or anything that doesn’t belong. But it has to be one of the two.

Welcome to the forum

Remove the space after b and the last comma.

Happy coding

Hello
Try removing the last comma which is after the 0 and before the end of the bracket.

That was it. I absent-mindedly added the space after rgb when I copied the code here. Interestingly enough, if I’d put a value after the last comma it might have worked, although an alpha channel isn’t part of this lesson.

2 Likes

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