-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (30 loc) · 1.17 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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Colour Guesser</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/brain.js/2.0.0-beta.1/brain-browser.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/color-thief/2.3.0/color-thief.umd.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<h1>Colour Guesser</h1>
<div class="container">
<div class="camera">
<video id="video">Video stream not available</video>
<button id="take-photo">Take photo</button>
</div>
<div class="output">
<img id="photo">
<div id="guess-result">
<p id="guess"></p>
</div>
</div>
</div>
<canvas id="canvas" hidden></canvas>
<p class="instructions">Hold a solid coloured object up to the camera (the object will need to fill the majority of the frame), then take a photo to let me guess it's colour.
Currently I can recognise red, yellow, green, blue, pink and grey.</p>
</main>
<script src="script.js"></script>
</body>
</html>