RGBA permette di aggiungere un quarto valore ad i colori RGB, che definisce l’opacità del colore.
Ecco un esempio:
Ed il CSS utilizzato nel primo caso è:
background-color: background: rgba(255, 0, 0, 0.2);
background-color: background: rgba(255, 0, 0, 0.4);
background-color: background: rgba(255, 0, 0, 0.6);
background-color: background: rgba(255, 0, 0, 0.8);
background-color: background: rgba(255, 0, 0, 1);
background-color: background: rgba(255, 0, 0, 0.4);
background-color: background: rgba(255, 0, 0, 0.6);
background-color: background: rgba(255, 0, 0, 0.8);
background-color: background: rgba(255, 0, 0, 1);
Mentre nel secondo caso lo stesso risultato è ottenuto con valori RGB:
background-color: rgb(243,191,189);
background-color: rgb(246,143,142);
background-color: rgb(249,95,94);
background-color: rgb(252,47,47);
background-color: rgb(255,0,0);
background-color: rgb(246,143,142);
background-color: rgb(249,95,94);
background-color: rgb(252,47,47);
background-color: rgb(255,0,0);
