|
Percent Red, Green, Blue, and Opacity Color Codes
This page demonstrates the percent representation of color
of the form rgba(R%,G%,B%,a), where R, G, and B are the decimal values for the red,
green, and blue values of the color on the range 0 to 100 and a is the
opacity of the color (a = 0 = transparent; a = 1 = opaque).
As of January 2009, the Mozilla and Google Chrome browsers display colors by this definition method.
For example, the color with values
60% for red, 76% for green, and 88% for blue
and which has an opacity of 0.5 (semi-transparent)
is rgba(60%,76%,88%,0.5).
This is just one of the ways you can define colors in HTML attributes and in Cascading Style Sheets; you can use a quick reference table to help you choose from among the many color tables available.
The color list below demonstrates these RBGA codes.
| Color Name | rgb(R%,G%,B%) | Swatch | rgba(R%,G%,B%,a) Swatches
|
|---|
| rgb(R,G,B) | a = 1.0 | a = 0.9 | a = 0.8 | a = 0.7 | a = 0.6 | a = 0.5 | a = 0.4 | a = 0.3 | a = 0.2 | a = 0.1 | a = 0.0
|
|---|
| black | rgb(0%,0%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | navy | rgb(0%,0%,50%) | text | text | text | text | text | text | text | text | text | text | text | text
| | blue | rgb(0%,0%,100%) | text | text | text | text | text | text | text | text | text | text | text | text
| | green | rgb(0%,50%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | teal | rgb(0%,50%,50%) | text | text | text | text | text | text | text | text | text | text | text | text
| | lime | rgb(0%,100%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | aqua | rgb(0%,100%,100%) | text | text | text | text | text | text | text | text | text | text | text | text
| | maroon | rgb(50%,0%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | purple | rgb(50%,0%,50%) | text | text | text | text | text | text | text | text | text | text | text | text
| | olive | rgb(50%,50%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | gray | rgb(50%,50%,50%) | text | text | text | text | text | text | text | text | text | text | text | text
| | silver | rgb(75%,75%,75%) | text | text | text | text | text | text | text | text | text | text | text | text
| | red | rgb(100%,0%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | fuchsia | rgb(100%,0%,100%) | text | text | text | text | text | text | text | text | text | text | text | text
| | yellow | rgb(100%,100%,0%) | text | text | text | text | text | text | text | text | text | text | text | text
| | white | rgb(100%,100%,100%) | text | text | text | text | text | text | text | text | text | text | text | text |
|