-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp3Shine.html
More file actions
157 lines (128 loc) · 2.98 KB
/
Copy pathp3Shine.html
File metadata and controls
157 lines (128 loc) · 2.98 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>P3 + Perceived Brightness Test</title>
<style>
body {
background: #0e0e0e;
color: #ccc;
font-family: system-ui, sans-serif;
padding: 40px;
}
h1 {
margin-bottom: 40px;
font-size: 28px;
color: #888;
}
.row {
display: flex;
gap: 40px;
margin-bottom: 60px;
}
.card {
width: 260px;
}
.label {
font-size: 12px;
color: #777;
margin-bottom: 12px;
}
.button {
padding: 14px 20px;
border-radius: 8px;
font-weight: 600;
text-align: center;
cursor: default;
}
/* ---------- BASE (sRGB) ---------- */
.base {
background: #ff6a00;
color: black;
}
/* ---------- ENHANCED (filters + glow) ---------- */
.enhanced {
background: #ff6a00;
color: black;
filter: brightness(115%) contrast(110%) saturate(115%);
box-shadow:
0 0 8px rgba(255,120,0,0.5),
0 0 24px rgba(255,80,0,0.4);
}
/* ---------- P3 ONLY ---------- */
.p3 {
background: color(display-p3 1 0.4 0);
color: black;
}
/* ---------- P3 + ENHANCED ---------- */
.p3-enhanced {
background: color(display-p3 1 0.4 0);
color: black;
filter: brightness(115%) contrast(110%) saturate(120%);
box-shadow:
0 0 10px rgba(255,120,0,0.6),
0 0 32px rgba(255,80,0,0.5);
}
/* headline test */
.headline {
font-size: 42px;
font-weight: 700;
margin-top: 20px;
}
.p3-headline {
color: color(display-p3 1 0.3 0);
}
.enhanced-headline {
color: #ff6a00;
text-shadow:
0 0 6px rgba(255,120,0,0.6),
0 0 20px rgba(255,80,0,0.4);
}
.p3-enhanced-headline {
color: color(display-p3 1 0.3 0);
text-shadow:
0 0 8px rgba(255,120,0,0.7),
0 0 28px rgba(255,80,0,0.5);
}
.status {
margin-top: 40px;
font-size: 13px;
color: #666;
}
</style>
</head>
<body>
<h1>Perceived Brightness / P3 Test</h1>
<div class="row">
<div class="card">
<div class="label">Base (sRGB)</div>
<div class="button base">Button</div>
<div class="headline">Headline</div>
</div>
<div class="card">
<div class="label">Enhanced (Glow + Filters)</div>
<div class="button enhanced">Button</div>
<div class="headline enhanced-headline">Headline</div>
</div>
<div class="card">
<div class="label">P3 Only</div>
<div class="button p3">Button</div>
<div class="headline p3-headline">Headline</div>
</div>
<div class="card">
<div class="label">P3 + Enhanced</div>
<div class="button p3-enhanced">Button</div>
<div class="headline p3-enhanced-headline">Headline</div>
</div>
</div>
<div class="status" id="status"></div>
<script>
// detect P3 support
const supportsP3 = CSS.supports('color', 'color(display-p3 1 0 0)');
document.getElementById('status').textContent =
supportsP3
? 'Display-P3 is supported on this device/browser.'
: 'Display-P3 is NOT supported. P3 colors are falling back to sRGB.';
</script>
</body>
</html>