CSS3/Color/RGBA - W3C Wiki
- Color
- <color> Values
- Basic color keywords
- RGB
- RGBA
- transparent
- HSL
- HSLA
- Extended color keywords
- currentColor
- <color> Values
The RGB color model is extended in this specification to include “alpha” to allow specification of the opacity of a color.
The format of the RGBA Value
- rgba(R,G,B,A) -integer-The format of an RGBA value in the functional notation is ‘rgba(’ followed by a comma-separated list of three numerical values (three integer values), followed by an <alphavalue>, followed by ‘)’.
- rgba(R,G,B,A) -percentage-The format of an RGBA value in the functional notation is ‘rgba(’ followed by a comma-separated list of three numerical values (three percentage values), followed by an <alphavalue>, followed by ‘)’.
Example
| Alpha | hsla(H,S,L,A) | Color | |
|---|---|---|---|
| 0.0 | rgba(255, 0, 0, 0.0) | fully transparent | |
| 0.2 | rgba(255, 0, 0, 0.2) | ||
| 0.4 | rgba(255, 0, 0, 0.4) | ||
| 0.6 | rgba(255, 0, 0, 0.6) | ||
| 0.8 | rgba(255, 0, 0, 0.8) | ||
| 1.0 | rgba(255, 0, 0, 1.0) | fully opaque |
Point, Note
- If RGBA values are not supported by a user agent, they should be treated like unrecognized values per the CSS forward compatibility parsing rules ([CSS21], Chapter 4). RGBA values must not be treated as simply an RGB value with the opacity ignored.
CSS Reference
The CSS Color Module Level 3 specification defines the RGBA color values in 4.2.2. RGBA color values.
Tag » Color.rgba(255 0 0 0)
-
CSS Colors - W3Schools
-
CSS RGB And RGBA Colors - W3Schools
-
Color To Hex And Rgba Converter - Popular Blocks
-
RBGA Decimal Color Codes - December Communications, Inc.
-
RGB Color (255, 0, 0)
-
What Color Is: Rgba(255,0,0,0.5) Code Example - Grepper
-
Explanation Of CSS RGBA Colors | Guide - WebFX
-
Red - Converting Colors
-
Colors - Should You Use Rgba(0, 0, 0, 0) Or Rgba(255, 255, 255, 0) For ...
-
(rgb(255, 0, 0)) - Why This Is In The Question? - Codecademy
-
Values And Units | CSS Guide - IFPB
-
RGB To Color Name Mapping(Triplet And Hex)
-
HTML Color Picker
-
Images: Color Codes - LibGuides At Texas Wesleyan University