67. PIXELS
A monitors screen is divided into a grid of small unit called picture elements or pixels.
The more pixels per inch the better the resolution, the sharper the image.
All colors on the screen are a combination of red, green and blue (RGB), just at various
intensities.
70. With web applications like HTML (Hypertext Markup Language), colors are sometime
described using their RGB color specification in hexadecimal.
<tr>
<td rowspan="2" bgcolor="#cccc99"> </td>
<td height="30" bgcolor="#999966"><div id="mainnav">
Hexadecimal Number
71. HEXADECIMAL RED GREEN BLUE
<td rowspan="2" bgcolor="#cccc99"> </td>
Red Green Blue
cc cc 99
<td height="30" bgcolor="#999966"><div id="mainnav">
Red Green Blue
99 99 66
# means hexadecimal in web applications
72. RICK’S NUMBER SYSTEM RULES
All digits start with 0
A Base-n number system has n number of digits:
• Decimal: Base-10 has 10 digits
• Binary: Base-2 has 2 digits
• Hexadecimal : Base-16 has 16 digits
The first column is always the number of 1’s
Each of the following columns is n times the previous column (n = Base-n)
• Base 10: 10,000 1,000 100 10 1
• Base 2: 16 8 4 2 1
• Base 16: 65,536 4,096 256 16 1
75. HEXADECIMAL DIGITS
4 BITS CAN BE REPRESENTED BY 1 HEX VALUE
Hexadecimal: 16 digits
Dec Hex Binary
8421
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
Dec Hex Binary
8421
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
76. HEXADECIMAL DIGITS
4 BITS CAN BE REPRESENTED BY 1 HEX VALUE
Hexadecimal: 16 digits
Dec Hex Binary
8421
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
Dec Hex Binary
8421
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
77. HOW MUCH RED GREEN BLUE ?
<td rowspan="2" bgcolor="#cccc99"> </td>
Red Green Blue
cc cc 99
<td height="30"bgcolor="#999966"><divid…>
Red Green Blue
99 99 66
78. HEXADECIMAL # RED GREEN BLUE
<td rowspan="2" bgcolor="#cccc99"> </td>
Red Green Blue
cc cc 99
Convert to Binary
Red Green Blue
Hex cc cc 99
Bin 1100 1100 1100 1100 1001 1001
24 bits represent a single color
79. Red Green Blue
Hex cc cc 99
Bin 1100 1100 1100 1100 1001 1001
24 bits represent a single color
80. Red Green Blue
Hex 00->FF 00->FF 00->FF
Bin 0000 0000 0000 0000 0000 0000
thru thru thru
1111 1111 1111 1111 1111 1111
Dec 0 -> 255 0 -> 255 0 -> 255
0
255
0
255
0
255
? ? ?