Setting color via # in CSS
The method of specifying color via rgb, despite the fact that it allows you to get any shade of any color, is still somewhat cumbersome. Therefore, there is a third option to specify color - via hexadecimal value.
To understand the essence of this method, you need to understand the hexadecimal number system. In it, unlike the decimal number that we use in life, there are not ten digits, but sixteen: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F - as you can see, due to the lack of numbers after nine, letters are used.
In this system, instead of rgb, the grid # is written, followed by six signs. The first two signs are red, the second two signs are green, and the last two signs are blue. The colors also range from 0 to 255, but in hexadecimal it would be from 00 to FF.
The following example colors the paragraph red:
<p>
text word version document book
</p>
p {
color: #FF0000;
}
:
Set all paragraphs to #FFEEAA color.
Set all paragraphs to a background of #000000 and a text color of #FFFFFF. What colors will this produce?
The following code is given:
p {
color: rgb(255, 200, 255);
}
Use some converter to convert the color to hexadecimal format.