forked from jmbussat/WS2812_ESP8266
-
Notifications
You must be signed in to change notification settings - Fork 0
/
html_header.h
54 lines (53 loc) · 10.2 KB
/
html_header.h
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
//
// Basic colorwheel base color picker using HTML5/Javascript
//
const char* html_header =
"<head>"
"<style>"
"body {overflow:hidden;"
"background:black;}"
"</style>"
"</head>"
"<body>"
"<canvas id='wheelCanvas' onclick='getColor(event)'>"
"</canvas>"
"<script type='text/javascript'>"
"var canvas = document.getElementById('wheelCanvas');"
"var context = canvas.getContext('2d');"
"var imageObj = new Image();"
"imageObj.crossOrigin = 'anonymous';"
"var dimension;"
"if(window.innerHeight<window.innerWidth){"
"dimension=window.innerHeight;"
"} else {"
"dimension=window.innerWidth;"
"}"
"imageObj.onload = function() {"
"context.drawImage(imageObj,0,0,600,600,0,0,0.98*dimension,0.98*dimension);"
"};"
"imageObj.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh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/JL0liPgTSfWss4GuF8xaLJ+k0zodCVQvX1P0U9uRuxTMWi84h6R9Ja4nUqjUL/jhWNWKYVik8EUdo1Co1r1s7N1Y7i2FIw2Mu+PLNIVqV7r6opT1er+CeJ4jqEU93u/u/o3dfFCOI5H804z73xdjVrFqtabWzu0TjMieGGRGeDBfa9ZtUq94+B+b83AxwhmJROdft4qb66nQpVHzpeLkZ4QzEEPa/tf2odzsUVfAmn4mSGII+37LKYuous3pniTYiCSangvi7Na7nUJ8clnGQwyFL8NpuV//xAAiEAADAAIBBAMBAQAAAAAAAAAAAREhMUEQUWHBobHh0ZH/2gAIAQEAAT8QTuRN5PONPJE8h5zzjRyNO2eU855jznl6Phit3okBUKxKugkfuU/ZUq0UopRVHsc0WumRkyMlBQTZjP8AYzvcwPcpOv3EtCzYXqjayOR5GPka5kemdGAb/SMj3GwWSGKhi/Y8XIluiOYLzJaZJu719P8Ac9M0QTonQ7cM3DXeS0HLYe5kfgenUZuHbu45g97DWjrHK5HK5Hbew9N6J8DHgNo4GBc6P29x73HvYfI7OR+cj/U9JE9bfQ+hwr5jP5ji7DuB3kd5Giz7CFuKSZFvQIe6F4yhWMoS8xyHcp/siYDWLs3Ct3YRuFKAkCHsJUyKUyKaqK3CFENAmDcbujr3CVH2EArt8i8ZJ8lWVOV6+CAwBTpSit4v+gQp+5ke4mhKBC/ZVl9hQl7DAyYGRSgW5L3PTGD7kI+xme5kdJibz0w5AxMmIJhUVGKGSXqfuN/Ud+o1Fhq5zTmiXRiJQUD+TG8mJC2xs5Y3fLE3dlrljctsfyYzkKRMuS+7K7ln/9k=';"
"canvas.height=window.innerHeight;"
"canvas.width=window.innerWidth;"
"function getColor(event) {"
"var canvas = document.getElementById('wheelCanvas');"
"var pixelData = canvas.getContext('2d').getImageData(event.offsetX, event.offsetY, 1, 1).data;"
"var form = document.createElement('form');"
"form.action='out';"
"var nr = document.createElement('input');"
"nr.name='R';"
"nr.value=pixelData[0].toString();"
"form.appendChild(nr);"
"var ng = document.createElement('input');"
"ng.name='G';"
"ng.value=pixelData[1].toString();"
"form.appendChild(ng);"
"var nb = document.createElement('input');"
"nb.name='B';"
"nb.value=pixelData[2].toString(); "
"form.appendChild(nb);"
"form.style.display='none';"
"document.body.appendChild(form);"
"form.submit(); "
"}"
"</script>"
"</body>";