-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (55 loc) · 2.93 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
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css' />
<link href="styles/index.css" rel="stylesheet">
<link href="styles/darkmode.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src='scripts/ntc.js'></script>
<script src='scripts/index.js'></script>
<!-- Meta -->
<title>What Color Is That?</title>
<link rel="icon" href="images/favicon.ico" type="favicon">
<meta name="author" content="DanBullockCS">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>What Color Is That?</h1>
<p>Upload or link an image and click a part of it to see what color it is.</p>
<p>I do not store any images uploaded, there is no database, check the <a href="https://github.com/DanBullockCS/WhatColorIsThat" target="_blank">code</a> if you don't believe me.</p>
<p id="mobile-only-msg">If you are viewing on a mobile browser, please <b>request desktop site</b> and zoom out.</p>
<p>If you are using the "Paste Image URL button", <a href="https://cors-anywhere.herokuapp.com/corsdemo" target="_blank">please click here</a> first and opt-in to the CORS Demo temporary access</p>
<a id="home-btn" href="https://danbullockcs.github.io/">Home</a>
<input type="file" id="imageLoader" name="imageLoader" accept="image/*" class="fileInput">
<button id="imageLinkButton" onclick="showUploadedImageURL()">Paste Image URL</button>
<input type="text" id="imageLinkLoader" name="imageLinkLoader" placeholder="http://...">
<button id="changeCrossHairbutton" onclick="changeCrosshairColor()">Randomize Selector Color</button>
<div id="canvasContainer">
<canvas id="can" width="600" height="400"></canvas>
<canvas id="backcan" width="600" height="400"></canvas>
<canvas id="colorcan" width="200" height="400"></canvas>
</div>
<br>
<div class="outputs">
<label for="rgbColorCode">RGB Color:</label>
<input type="text" id="rgbColorCode" name="rgbColorCode" readonly>
</div>
<div class="outputs">
<label for="hexColorCode">Hex Color:</label>
<input type="text" id="hexColorCode" name="hexColorCode" readonly>
</div>
<div class="outputs">
<label for="colorName">Closest Color Name:</label>
<input type="text" id="colorName" name="colorName" readonly>
</div>
<!-- <div class="footer">
<a href="https://github.com/DanBullockCS" target="_blank" class="footer-text">Made by @DanBullockCS</a>
</div> -->
<div class="switchDiv">
<label class="dark-mode-label">Dark Mode</label>
<label class="switch">
<input type="checkbox" id="dark-mode-switch" onclick="toggleDarkMode()">
<span class="slider"></span>
</label>
</div>
</body>
</html>