-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathqueries.html
30 lines (28 loc) · 925 Bytes
/
queries.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
<html lang="en">
<head>
<script>
let main = function() {
if (window.matchMedia("(color-gamut: srgb)").matches) {
Result.innerHTML += "color-gamut matches srgb<br>";
}
if (window.matchMedia("(color-gamut: p3)").matches) {
Result.innerHTML += "color-gamut matches p3<br>";
}
if (window.matchMedia("(color-gamut: rec2020)").matches) {
Result.innerHTML += "color-gamut matches rec2020<br>";
}
if (window.matchMedia("(dynamic-range: standard)").matches) {
Result.innerHTML += "dynamic-range matches standard<br>";
}
if (window.matchMedia("(dynamic-range: high)").matches) {
Result.innerHTML += "dynamic-range matches high<br>";
}
Result.innerHTML += "window.screen.colorDepth: " + window.screen.colorDepth + "<br>";
Result.innerHTML += "window.screen.pixelDepth: " + window.screen.pixelDepth + "<br>";
}
</script>
</head>
<body onload='main()'>
<p id="Result"></p>
</body>
</html>