I'm looking for RGBA code for red color with opacity: Can someone tell me how can i find about it?(or where i can learn more about RGBA colors? Thanks.
Asked
Active
Viewed 8.3k times
1 Answers
30
rgba(red, green, blue, alpha)
The range for red, green and blue is 0-255. The high the number, the more presence the color shows.
The range for alpha is 0.0-1.0. The higher the number, the higher the opacity.
Fully opaque red would be rgba(255, 0, 0, 1)

McKayla
- 6,879
- 5
- 36
- 48
-
2+1 Sometimes alpha is also specified as an integral in the range `[0, 255]` for a 32-bit color with 8-bit channels (including alpha); for a 1-bit alpha channel it would be `0 -or- 1`, etc. However, thinking of opacity as decimal number in `[0.0, 1.0]` is nice [and *the* way to represent alpha in some encodings] and makes a bunch of math "just work". – Mar 06 '11 at 00:58