-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
136 lines (136 loc) · 4.7 KB
/
index.html
File metadata and controls
136 lines (136 loc) · 4.7 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HDR Split Canvas</title>
<style>
body {
margin: 0;
padding: 20px;
font-family: Arial, sans-serif;
background-color: #1a1a1a;
}
#container {
max-width: 1200px;
margin: 0 auto;
background-color: #2a2a2a;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
canvas {
display: block;
width: 100%;
height: auto;
border: 1px solid #3a3a3a;
cursor: crosshair;
background-color: #1e1e1e;
}
#grayscaleBar {
margin-bottom: 0;
border-radius: 4px 4px 0 0;
height: 40px;
}
#outputBar {
margin-bottom: 10px;
border-radius: 0 0 4px 4px;
height: 20px;
border-top: 1px solid #3a3a3a;
}
#info {
margin-top: 10px;
font-size: 12px;
color: #aaa;
}
#infoBox {
background-color: #2a2a2a;
border: 1px solid #3a3a3a;
border-radius: 4px;
padding: 10px 15px;
margin: 10px 0;
font-size: 13px;
color: #aaa;
min-width: 600px;
font-family: 'Courier New', monospace;
}
#infoBox strong {
color: #00d4ff;
cursor: text;
padding: 2px 4px;
border-radius: 3px;
}
#infoBox strong.editable {
background-color: #3a3a3a;
outline: 1px solid #00d4ff;
}
#infoBox input.inline-edit {
background-color: #1e1e1e;
border: none;
outline: 1px solid #00d4ff;
color: #fff;
padding: 2px 4px;
border-radius: 3px;
width: 60px;
font-size: inherit;
font-weight: bold;
text-align: right;
font-family: 'Courier New', monospace;
}
#controls {
margin: 10px 0;
display: flex;
gap: 10px;
}
#controls button {
background-color: #3a3a3a;
color: #aaa;
border: 1px solid #4a4a4a;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
transition: all 0.2s;
}
#controls button:hover {
background-color: #4a4a4a;
color: #00d4ff;
border-color: #00d4ff;
}
</style>
</head>
<body>
<div id="container">
<canvas id="grayscaleBar"></canvas>
<canvas id="outputBar"></canvas>
<div id="infoBox" style="display: flex; align-items: center; gap: 20px;">
<span style="display: inline-flex; align-items: center;">
<span style="color: #888; margin-right: 8px;">Value:</span>
<strong id="valueDisplay" style="display: inline-block; width: 35px; text-align: right;">--</strong>
</span>
<span style="display: inline-flex; align-items: center;">
<span style="color: #888; margin-right: 8px;">Hex:</span>
<span style="display: inline-flex; align-items: center; gap: 6px;">
<span id="colorBox" style="display: inline-block; width: 20px; height: 20px; border: 1px solid #4a4a4a; border-radius: 3px; background-color: #000;" title="Input color"></span>
<span id="outputColorBox" style="display: inline-block; width: 20px; height: 20px; border: 1px solid #4a4a4a; border-radius: 3px; background-color: #000;" title="Output color"></span>
<strong id="hexDisplay" style="display: inline-block; width: 70px;">--</strong>
</span>
</span>
<span style="display: inline-flex; align-items: center;">
<span style="color: #888; margin-right: 8px;">Weight:</span>
<strong id="weightDisplay" style="display: inline-block; width: 60px; text-align: right;">--</strong>
</span>
</div>
<canvas id="canvas"></canvas>
<div id="controls">
<button id="saveBtn">Save to File</button>
<button id="loadBtn">Load from File</button>
<input type="file" id="fileInput" accept=".json" style="display: none;">
</div>
<div id="info">
Click to add points | Double-click to remove | Drag to move
</div>
</div>
<script src="hdr-split.js"></script>
</body>
</html>