What exactly means: "color: #1c9aff;"?
A hex triplet is a six-digit, three-byte hexadecimal number used in HTML, CSS, SVG, and other computing applications, to represent colors. The bytes represent the red, green and blue components of the color. One byte (8 bits) represents a number in the range 00 to FF (in hexadecimal notation). This represents the least (00) to the most (FF) intensity of each of the color components. Thus web colors specify colors in the Truecolor (24-bit RGB) color scheme.
Can you understand why is 24 bits? Because each color components have 8 bits of size. And there are 3 bytes so 3*8 bits=24 bits.
The hex triplet is formed by concatenating three bytes in hexadecimal notation, in the following order:
- Byte 1: red value (color type red);
- Byte 2: green value (color type green);
- Byte 3: blue value (color type blue);
The format of an RGB value in hexadecimal notation is a ‘
#
’ immediately followed by six hexadecimal characters.
The number of colors that can be represented by this system is 28 (256) × 28 (256) × 28 (256) = 16,777,216.
No comments:
Post a Comment