-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01-colors.html
161 lines (133 loc) · 3.4 KB
/
01-colors.html
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS Property 1 - Colors</title>
<style>
h1 {
color: brown;
}
h2 {
color: hsl(300, 100%, 25%);
}
/* Color Name */
.color-red {
color: red;
}
#color-green {
color: green;
}
.color-blue {
color: blue;
}
/* Hexadecimal Color */
.hexadecimal-red {
color: #ff0000;
}
#hexadecimal-green {
color: #00ff00;
}
.hexadecimal-blue {
color: #0000ff;
}
.hexadecimal-custom {
color: #ff4587;
}
/* RGB Color */
.rgb-red {
color: rgb(255, 0, 0);
}
#rgb-green {
color: rgb(0, 255, 0);
}
.rgb-blue {
color: rgb(0, 0, 255);
}
/* RGBA */
.rgba-red {
color: rgba(255, 0, 0, 0.5);
}
#rgba-green {
color: rgba(0, 255, 0, 0.9);
}
.rgba-blue {
color: rgba(0, 0, 255, 0.7);
}
/* HSL */
.hsl-red {
color: hsl(0, 100%, 50%);
}
#hsl-green {
color: hsl(120, 100%, 50%);
}
.hsl-blue {
color: hsl(240, 100%, 50%);
}
/* HSLA */
.hsla-red {
color: hsla(0, 100%, 50%, 0.5);
}
#hsla-green {
color: hsla(120, 100%, 50%, 0.7);
}
.hsla-blue {
color: hsla(240, 100%, 50%, 0.6);
}
</style>
</head>
<body>
<h1>Colors</h1>
<!-- Color Name -->
<h2>Color Name</h2>
<p class="color-red">Color Name 1 - Red</p>
<p id="color-green">Color Name 2 - Green</p>
<p class="color-blue">Color Name 3 - Blue</p>
<hr />
<!-- Hexadecimal -->
<h2>Hexadecimal</h2>
<p class="hexadecimal-red">Hexadecimal Color 1 - RED (#ff0000)</p>
<p id="hexadecimal-green">Hexadecimal Color 2 - GREEN (#00ff00)</p>
<p class="hexadecimal-blue">Hexadecimal Color 3 - BLUE (#0000ff)</p>
<p class="hexadecimal-custom">Hexadecimal Color 4 - Custom (#ff4587)</p>
<hr />
<!-- RGB -->
<h2>RGB</h2>
<p class="rgb-red">RGB Color 1 - RED [rgb(255, 0, 0)]</p>
<p id="rgb-green">RGB Color 2 - GREEN [rgb(0, 255, 0)]</p>
<p class="rgb-blue">RGB Color 3 - BLUE [rgb(0, 0, 255)]</p>
<hr />
<!-- RGBA -->
<h2>RGBA</h2>
<p class="rgba-red">
RGBA Color 1 - RED but Opacity 50% [rgba(255, 0, 0, 0.5)]
</p>
<p id="rgba-green">
RGBA Color 2 - GREEN but Opacity 90% [rgba(0, 255, 0, 0.9)]
</p>
<p class="rgba-blue">
RGBA Color 3 - BLUE but Opacity 70% [rgba(0, 0, 255, 0.7)]
</p>
<hr />
<!-- HSL -->
<h2>HSL</h2>
<p class="hsl-red">HSL Color 1 - RED [hsl(0, 100%, 50%)]</p>
<p id="hsl-green">HSL Color 2 - GREEN [hsl(120, 100%, 50%)]</p>
<p class="hsl-blue">HSL Color 3 - BLUE [hsl(240, 100%, 50%)]</p>
<hr />
<!-- HSLA -->
<h2>HSLA</h2>
<p class="hsla-red">
HSLA Color 1 - RED but Opacity 50% [hsla(0, 100%, 50%, 0.5)]
</p>
<p id="hsla-green">
HSLA Color 2 - GREEN but Opacity 70% [hsla(120, 100%, 50%,0.7)]
</p>
<p class="hsla-blue">
HSLA Color 3 - BLUE but Opacity 60% [hsla(240, 100%, 50%, 0.6)]
</p>
<hr />
<!-- Done with Colors -->
</body>
</html>