-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcolor-comparison.html
More file actions
234 lines (219 loc) · 8.92 KB
/
color-comparison.html
File metadata and controls
234 lines (219 loc) · 8.92 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pierre Theme - Display P3 Color Comparison</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
max-width: 1200px;
margin: 40px auto;
padding: 20px;
background: #141415;
color: #fbfbfb;
}
h1 { text-align: center; margin-bottom: 40px; }
.comparison-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin: 40px 0;
}
.color-card {
background: #1f1f21;
border-radius: 12px;
padding: 20px;
border: 1px solid #39393c;
}
.color-card h3 {
margin-top: 0;
color: #fbfbfb;
}
.color-swatch {
height: 100px;
border-radius: 8px;
margin: 10px 0;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-family: 'Monaco', 'Courier New', monospace;
font-size: 12px;
color: white;
text-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.label {
font-size: 12px;
color: #adadb1;
margin-bottom: 5px;
margin-top: 15px;
}
.hex-value {
font-family: 'Monaco', 'Courier New', monospace;
font-size: 11px;
color: #c6c6c8;
margin-top: 5px;
word-break: break-all;
}
.info {
background: #2e2e30;
padding: 20px;
border-radius: 8px;
margin: 20px 0;
border-left: 4px solid color(display-p3 0.340 0.734 0.360);
}
.info h3 {
margin-top: 0;
}
.p3-notice {
text-align: center;
padding: 15px;
background: #39393c;
border-radius: 8px;
margin: 20px 0;
}
.supports { color: color(display-p3 0.340 0.734 0.360); }
.no-support { color: #ff6762; }
code {
background: #2e2e30;
padding: 2px 6px;
border-radius: 4px;
font-size: 13px;
}
</style>
</head>
<body>
<h1>Pierre Theme: Display P3 Color Comparison</h1>
<div class="p3-notice" id="p3-status">
Checking Display P3 support...
</div>
<div class="info">
<h3>About Display P3 Enhanced Colors</h3>
<p>Display P3 is a wider color gamut that can display ~25% more colors than standard sRGB. The Pierre Vibrant themes use CSS <code>color(display-p3 r g b)</code> format with <strong>enhanced saturation</strong> to fully utilize the P3 color space.</p>
<p><strong>Enhancement:</strong> Colors are boosted by 15-30% saturation (depending on original saturation) and 5% luminance for highly saturated colors. This pushes colors into the wider P3 gamut that isn't available in sRGB.</p>
<p><strong>Important:</strong> To see the difference, you need a P3-capable display (most Macs from 2015+, iPhones, iPads).</p>
</div>
<div class="comparison-grid">
<div class="color-card">
<h3>Blue</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #008cff;">
#008cff
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 0.267653 0.570512 1.000000);">
P3
</div>
<div class="hex-value">color(display-p3 0.267653 0.570512 1.000000)</div>
</div>
<div class="color-card">
<h3>Green</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #0dbe4e;">
#0dbe4e
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 0.298067 0.776115 0.322484);">
P3
</div>
<div class="hex-value">color(display-p3 0.298067 0.776115 0.322484)</div>
</div>
<div class="color-card">
<h3>Red</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #ff2e3f;">
#ff2e3f
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 1.000000 0.250216 0.262337);">
P3
</div>
<div class="hex-value">color(display-p3 1.000000 0.250216 0.262337)</div>
</div>
<div class="color-card">
<h3>Purple</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #c635e4;">
#c635e4
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 0.770871 0.230698 0.945253);">
P3
</div>
<div class="hex-value">color(display-p3 0.770871 0.230698 0.945253)</div>
</div>
<div class="color-card">
<h3>Pink</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #fc2b73;">
#fc2b73
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 0.995522 0.233444 0.460772);">
P3
</div>
<div class="hex-value">color(display-p3 0.995522 0.233444 0.460772)</div>
</div>
<div class="color-card">
<h3>Orange</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #fe8c2c;">
#fe8c2c
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 1.000000 0.598672 0.265916);">
P3
</div>
<div class="hex-value">color(display-p3 1.000000 0.598672 0.265916)</div>
</div>
<div class="color-card">
<h3>Cyan</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #08c0ef;">
#08c0ef
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 0.327292 0.790977 0.995660);">
P3
</div>
<div class="hex-value">color(display-p3 0.327292 0.790977 0.995660)</div>
</div>
<div class="color-card">
<h3>Teal</h3>
<div class="label">Standard (sRGB)</div>
<div class="color-swatch srgb" style="background-color: #00c5d2;">
#00c5d2
</div>
<div class="label">Vibrant (Display P3 Enhanced)</div>
<div class="color-swatch p3" style="background-color: color(display-p3 0.342284 0.816699 0.877157);">
P3
</div>
<div class="hex-value">color(display-p3 0.342284 0.816699 0.877157)</div>
</div>
</div>
<div class="info">
<h3>Browser Support</h3>
<p>CSS <code>color(display-p3 ...)</code> is supported in:</p>
<ul>
<li>Safari 10+ (macOS and iOS)</li>
<li>Chrome 111+</li>
<li>Firefox 113+</li>
<li>Edge 111+</li>
</ul>
<p>Browsers without P3 support will automatically fall back to the closest sRGB color.</p>
</div>
<script>
// Check for P3 support
const supportsP3 = window.matchMedia('(color-gamut: p3)').matches;
const statusEl = document.getElementById('p3-status');
if (supportsP3) {
statusEl.innerHTML = '<span class="supports">✓</span> Your display supports Display P3! You should see more vibrant colors in the P3 swatches above. Compare the top and bottom colors in each card.';
statusEl.style.borderLeft = '4px solid color(display-p3 0.340 0.734 0.360)';
} else {
statusEl.innerHTML = '<span class="no-support">✗</span> Your display does not support Display P3, or your browser doesn\'t support the color(display-p3) syntax. The P3 colors will appear similar to the standard sRGB colors.';
statusEl.style.borderLeft = '4px solid #ff6762';
}
</script>
</body>
</html>