For some reason or another, hexcolors are almost always used in css-files. Personally, I prefer to use rgb-colors. It is valid code according to w3schools.com.
Some examples of hexcolors: 000000 = black, ff0000 = red, 00ff00 = green, 0000ff = blue, ffff00 = yellow, ff00ff = magenta, 00ffff = cyan and ffffff = white (in other words, the values are written with the hexadecimal numerical system, which uses the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e and f).
Some examples of rgb-colors: 0,0,0 = black, 255,0,0 = red, 0,255,0 = green, 0,0,255 = blue, 255,255,0 = yellow, 255,0,255 = magenta, 0,255,255 = cyan and 255,255,255 = white.
There are perhaps advantages with using hexcolors in css-documents that I'm not aware of, but according to my experience the result doesn't differ much (if at all) if you use rgb-colors instead.
Write like this to get blue text:
Css: .blue {color:rgb(0,0,255);}
Html: <p class="blue">The text returns blue.</p>
Write like this to get blue text and grey background:
Css: .blue_and_grey {color:(0,0,255); background:rgb(224,224,224);}
Html: <p class="blue_and_grey">The text returns blue. The background returns grey.</p>