-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (66 loc) · 3.3 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
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
<!doctype html>
<html class="no-js" lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>RGB to Hex Color Converter</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<!-- Bootstrap styles -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/signin.css">
</head>
<body class="text-center">
<!--[if lte IE 9]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- Add your site or application content here -->
<div class="container">
<div class="row justify-content-center">
<div class="col-6">
<form class="form-signin">
<h1 class="h3 mb-3 font-weight-normal">Introduce your color</h1>
<label for="hexcolor">Hex Color</label>
<input id="hexcolor" class="form-control" type="text" minlength="3" maxlength="6" placeholder="i.e. 3F909E" pattern="^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
title="Hex format: FAFAFA or F0F." name="hexcolor">
<label for="rgbcolor">RGB Color</label>
<!-- To try out the pattern: https://regex101.com/r/tU3gC3/71-->
<input id="rgbcolor" class="form-control" type="text" minlength="5" maxlength="11" placeholder="i.e. 0,254,19" pattern="^((2[0-5][0-5]|[01]?[0-9][0-9]?)[,](2[0-5][0-5]|[01]?[0-9][0-9]?)[,](2[0-5][0-5]|[01]?[0-9][0-9]?))$" name="rgbcolor">
<br>
<button id="tohex" type="button" class="btn btn-lg btn-primary btn-block" name="tohex">Convert to Hex</button>
<button id="torgb" type="button" class="btn btn-lg btn-primary btn-block" name="torgb">Convert to RGB</button>
</form>
</div>
<div class="col-6">
<div class="row justify-content-center">
<h1 class="h3 mb-3 font-weight-normal">Converted color</h1>
<div class="w-100"></div>
<div class="col-6" id="convcolor" style="background-color: rgb(255, 255, 255)">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</div>
</div>
</div>
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script>
window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
</html>