11

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.

1

1 Answer 1

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)

1
  • 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".
    – user166390
    Mar 6, 2011 at 0:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.