Rgba code help


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-html-css/lessons/css-colors/exercises/alpha-value?action=lesson_resume

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Did you use an RGBa color?

```

color: rgba(2, 93%, 140%, 0.6);

<do not remove the three backticks above>

#2

rgba() takes four arguments. The first three are positive integers between 0 and 255 inclusive, the last a number between 0 and 1 inclusive. The last value may be a percentage between 0% and 100% inclusive.

Eg.

div {
  width: 200px; 
  height: 200px; 
  background-color: rgba(127, 80, 255, 75%);
}
R = 127
G = 80
B = 255
opacity = 75% (alpha channel)

#3

I figured it out

I was doing, color: rgba(127, 80%, 255%, 0.75);

Instead of, color: rgba(127, 80, 255, 0.75);


#4

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