CSS Units for Colors
- By Name - 16 (basic Windows VGA) color names supported by all the major browsers
- aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow
- Many more names may also be supported, but the above are pretty sure to work. For example: orange, pink, tan....
- Colors by RGB (Red, Green, Blue)
- By percentages
h1 {rgb(25%, 50%, 75%)} h2 {rgb(100%, 0%, 0%)}
- By numbers (0 - 255)
h1 {rgb(0, 255, 0)} h2 {rgb(128,255, 240)}
- By hexadecimal numbers (00 - FF, format: #RRGGBB)
h1 {color:#0000FF} h2 {color:#287f92}
- By shorthand hexadecimal numbers (0 - F, #FFF is same as #FFFFFF; #8F2 is #88FF22)
h1 {color:#0FF} h2 {color:#80F}