RGB Colors
Named colors are handy, but green is quite a strong, bright green. For calmer headings, we need a shade that has no name. That's what RGB colors are for.
A screen creates every color by mixing red, green and blue light: each of its dots (pixels) is made of three even tinier lights in these colors. RGB stands for red, green and blue. An RGB color says how brightly each of the three lights shines, on a scale from 0 (off) to 255 (full brightness):
h1 {
color: rgb(255, 0, 0);
}rgb() is a function: a name followed by values in parentheses, separated by commas. Here, red shines at full brightness and green and blue are off, so the heading is red. A few more examples:
rgb(255, 255, 0)is yellow: red and green light together make yellow,rgb(0, 0, 0)is black: all the lights are off,rgb(255, 255, 255)is white: all the lights shine at full brightness,rgb(128, 128, 128)is gray: when all three numbers are the same, we get a gray, and the higher the numbers, the lighter it is.
Each of the three numbers can have 256 values (0 to 255), which gives 256 × 256 × 256, more than 16 million colors.
You don't have to guess the numbers: graphics programs and online color pickers (search for "color picker") show the RGB values of any color you choose.
Instructions
In the rule for h2, change the value of color from green to rgb(71, 105, 88), a calm grayish green.