-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (44 loc) · 1.72 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Color Converter</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="/images/favicon.png">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Color Converter</h1>
<div class="color-display" id="colorDisplay"></div>
<div class="input-group">
<label for="inputFormat">Convert from:</label>
<select id="inputFormat">
<option value="hex">HEX</option>
<option value="rgb">RGB</option>
<option value="hsl">HSL</option>
<option value="cmyk">CMYK</option>
<option value="hsv">HSV</option>
</select>
</div>
<div class="input-group">
<label for="inputColor">Enter Color:</label>
<input type="text" id="inputColor" placeholder="#000000 or rgb(0,0,0) or hsl(0,0%,0%)">
</div>
<div class="input-group">
<label for="outputFormat">Convert to:</label>
<select id="outputFormat">
<option value="rgb">RGB</option>
<option value="hex">HEX</option>
<option value="hsl">HSL</option>
<option value="cmyk">CMYK</option>
<option value="hsv">HSV</option>
</select>
</div>
<button id="convertButton" onclick="convertColors()">Convert</button>
<div class="result" id="result"></div>
</div>
<script src="script.js"></script>
</body>
</html>