RGB stands for red, green, and blue. An RGB value specifies the amounts of red, green, and blue that mix together to form the displayed color. To specify an amount of a color, you can use a percentage, an integer, or a hexadecimal number (we’ll explain hexadecimal shortly). We’ll provide explanations and examples coming up, but for now, here are the allowable ranges for each technique:
percentage—0% to 100% for each color
integer—0 to 255 for each color
hexadecimal—00 to ff for each color
To specify an RGB value with percentages, use this format:
rgb(red-percent, green-percent, blue-percent)
Each percent value must be between 0% and 100%. Here’s an example class selector rule that ...