forked from color-js/color.js
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gradients.html
58 lines (58 loc) · 2.29 KB
/
gradients.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gamut Mapping Experiments - Gradients</title>
<link rel="stylesheet" href="gradients.css" />
<link rel="shortcut icon" />
<script type="module" src="../../elements/css-color/css-color.js"></script>
<script type="module" src="gradients.js"></script>
</head>
<body>
<header>
<h1>Gamut Mapping Gradients</h1>
<p>Use keyboard arrow keys to increment/decrement, share by copying the URL</p>
</header>
<div class="controls">
<label for="space">Interpolation space:</label>
<select v-model="space" name="space">
<option v-for="space in interpolationSpaces" :value="space">{{ space }}</option>
</select><br/>
<label for="maxDeltaE">Max DeltaE between steps:</label>
<input v-model="maxDeltaE" type="number" min="1" name="maxDeltaE"/><br/>
<div>{{steps.length}} Gradient Steps</div>
<label for="flush">Flush:</label> <input type="checkbox" v-model="flush" name="flush">
</div>
<div class="color-inputs">
<css-color swatch="large" @colorchange="event => colorNullable = event.detail.color" :value="from">
<input v-model="from" />
</css-color>
<css-color swatch="large" @colorchange="event => colorNullable = event.detail.color" :value="to">
<input v-model="to" />
</css-color>
</div>
<div class="mapped-gradient oog">
<details class="gamut-legend"><summary><strong>Gamut indicator</strong></summary>
Shows the smallest gamut that the color from the unmapped gradient fits in.
<ul>
<li><span class="color-block" style="--step-color:yellowgreen"></span> In sRGB</li>
<li><span class="color-block" style="--step-color:gold"></span> In p3</li>
<li><span class="color-block" style="--step-color:orange"></span> In rec2020</li>
<li><span class="color-block" style="--step-color:red"></span> Out of rec2020</li>
</ul>
</details>
<div class="gradient">
<div v-for="[title, step] in oogSteps" :style="{'--step-color': step}" :title="title"></div>
</div>
</div>
<div :class="{flush, 'gradients': true}">
<article class="method" v-for="(i, method) of methods">
<mapped-gradient :key="i" :steps="steps" :method="i"/>
</article>
</div>
<div class="footer">
<a href="./index.html">Gamut mapping Playground</a>
</div>
</body>
</html>