RGB colors
The abbreviation RGB stands for Red Green Blue. These are the components that can be used to create any color. Each component can have a value from 0 to 255, where 0 means that the color does not contain that component and 255 means that the color contains that component at maximum intensity.
The order of the color components, as the name suggests, is red, green, blue.
For example:
p {
color: rgb(255, 0, 0);
}
This sets the color of paragraphs to red, as we set the red component to the maximum value (255), green and blue to the minimum value (0), so the resulting color only contains the red component.
If each component is set to the minimum value (0), the resulting color would be black, and if each component is set to the maximum value (255), the resulting color would be white.
You can see how many different colors can be created by combining different values!
Instructions
Change the color of second-level headings (h2
) to the following color: rgb(71, 105, 88)
.
Start programming for free
3/8