-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assignment 3
94 lines (72 loc) · 2.7 KB
/
Assignment 3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
hex to rgb :
#a3461f = rgb(163, 70, 31)
a3 = a * 16^1 + 3 * 16^0 = 10 * 16 + 3 * 1 = 163
46 = 4 * 16^1 + 6 * 16^0 = 64 + 6 = 70
1f = 1 * 16^1 + f * 16^0 = 16 + 15 * 1 = 31
#ab34c6 = rgb(171, 52, 198)
ab = a * 16^1 + b * 16^0 = 10 * 16 + 11 * 1 = 171
34 = 3 * 16^1 + 4 * 16^0 = 48 + 4 = 52
c6 = c * 16^1 + 6 * 16^0 = 12 * 16 + 6 * 1 = 198
#7feb23 = rgb(127, 235, 35)
7f = 7 * 16^1 + f * 16^0 = 112 + 15 * 1 = 127
eb = e * 16^1 + b * 16^0 = 14 * 16 + 11 * 1 = 235
23 = 2 * 16^1 + 3 * 16^0 = 32 + 3 = 35
#b4571a = rgb(180, 87, 26)
b4 = b * 16^1 + 4 * 16^0 = 11 * 16 + 4 * 1 = 180
57 = 5 * 16^1 + 7 * 16^0 = 80 + 7 = 87
1a = 1 * 16^1 + a * 16^0 = 16 + 10 * 1 = 26
#6ab34c = rgb(106, 179, 76)
6a = 6 * 16^1 + a * 16^0 = 96 + 10 * 1 = 106
b3 = b * 16^1 + 3 * 16^0 = 11 * 16 + 3 * 1 = 179
4c = 4 * 16^1 + c * 16^0 = 64 + 12 * 1 = 76
#b237fe = rgb(178, 55, 254)
b2 = b * 16^1 + 2 * 16^0 = 11 * 16 + 2 * 1 = 178
37 = 3 * 16^1 + 7 * 16^0 = 48 + 7 = 55
fe = f * 16^1 + e * 16^0 = 15 * 16 + 14 * 1 = 254
#71ab45 = rgb(113, 171, 69)
71 = 7 * 16^1 + 1 * 16^0 = 112 + 1 = 113
ab = a * 16^1 + b * 16^0 = 10 * 16 + 11 * 1 = 171
45 = 4 * 16^1 + 5 * 16^0 = 64 + 5 = 69
#715ab4 = rgb(113, 90, 180)
71 = 7 * 16^1 + 1 * 16^0 = 112 + 1 = 113
5a = 5 * 16^1 + a * 16^0 = 80 + 10 * 1 = 90
b4 = b * 16^1 + 4 * 16^0 = 11 * 16 + 4 * 1 = 180
rgb to hex:
rgb(213, 12,112) = #d50c70
213 = 16 * 13 + 1 * 5 = d5
12 = 16 * 0 + 1 * 12 = 0c
112 = 16 * 7 + 1 * 0 = 70
rgb(22,126,52) = #167e34
22 = 16 * 1 + 1 * 6 = 16
126 = 16 * 7 + 1 * 14 = 7e
52 = 16 * 3 + 1 * 4 = 34
rgb(213,214,41) = #d5d629
213 = 16 * 13 + 1 * 5 = d5
214 = 16 * 13 + 1 * 6 = d6
41 = 16 * 2 + 1 * 9 = 29
rgb(113,22,113) = #711671
113 = 16 * 7 + 1 * 1 = 71
22 = 16 * 1 + 1 * 6 = 16
113 = 16 * 7 + 1 * 1 = 71
rgb(126,112,172) = #7e70ac
126 = 16 * 7 + 1 * 14 = 7e
112 = 16 * 7 + 1 * 0 = 70
172 = 16 * 10 + 1 * 12 = ac
rgb(142,24,241) = #8e18f1
142 = 16 * 8 + 1 * 14 = 8e
24 = 16 * 1 + 1 * 8 = 18
241= 16 * 15 + 1 * 1 = f1
rgb(123,32,121) = #7b2079
123 = 16 * 7 + 1 * 11 = 7b
32 = 16 * 2 + 1 * 0 = 20
121 = 16 * 7 + 1 * 9 = 79
rgba(127,123,224,.4) = #7f7be066
127 = 16 * 7 + 1 * 15 = 7f
123 = 16 * 7 + 1 * 11 = 7b
224 = 16 * 14 + 1 * 0 = e0
0.4 * 255 = 102 --> 0.6 * 16 = 96 --> 66
4 css properties that need color values:
background-color
border-color
text-decoration-color
caret-color