Back to the index.

RGB colors are the standard for web pages. Here I test several syntaxes of them, including the one with an alpha channel.


With a hexadecimal value.

background-color: #cb000f

color: #cb000f

border-color: #cb000f;

With an rgb() value with integers.

background-color: rgb(203,0,15)

color: rgb(203,0,15)

border-color: rgb(203,0,15);

With an rgb() value with percentages.

background-color: rgb(79%,0%,6%)

color: rgb(79%,0%,6%)

border-color: rgb(79%,0%,6%)

With an rgba() value with integers.

background-color: rgba(203,0,15,0.6)

color: rgba(203,0,15,0.6)

border-color: rgba(203,0,15,0.6)

With an rgba() value with percentages.

background-color: rgba(79%,0%,6%,0.6)

color: rgba(79%,0%,6%,0.6)

border-color: rgba(79%,0%,6%,0.6)