CSS Colors rgba() Notation

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Similar to rgb() notation, but with an additional alpha (opacity) value.

.red {
    /* Opaque red */
    color: rgba(255, 0, 0, 1);
}

.red-50p {
    /* Half-translucent red. */
    color: rgba(255, 0, 0, .5);
}

Syntax

rgba(<red>, <green>, <blue>, <alpha>);
ValueDescription
<red>an integer from 0 - 255 or percentage from 0 - 100%
<green>an integer from 0 - 255 or percentage from 0 - 100%
<blue>an integer from 0 - 255 or percentage from 0 - 100%
<alpha>a number from 0 - 1, where 0.0 is fully transparent and 1.0 is fully opaque


Got any CSS Question?