function
rgba() — CSS reference
rgba() is an alias of rgb(), not a different color space. Both names accept modern space-separated syntax and legacy comma forms. Use rgb() consistently in new code if preferred; alpha controls transparency independently of the three channels.
Formal Syntax & Structure
css syntaxcss
rgba(R, G, B, A); rgba(R G B / A)Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS color lab</title><style>body {margin:0} .sample {height:12px;background:#006050}p {padding:12px;background:white;color:black;border:2px solid currentColor} #a{color:rgba(0, 0, 255, .25)} #b{color:rgb(0 0 255 / 25%)}
</style><body><p id="a">First color sample</p><p id="b">Second color sample</p></body></html>