@pierre/theme 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ name: Publish to VS Marketplace
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Setup Node.js
16
+ uses: actions/setup-node@v4
17
+ with:
18
+ node-version: '20'
19
+ cache: 'npm'
20
+
21
+ - name: Install dependencies
22
+ run: npm ci
23
+
24
+ - name: Build theme
25
+ run: npm run build
26
+
27
+ - name: Package extension
28
+ run: npm run package
29
+
30
+ - name: Publish to VS Marketplace
31
+ env:
32
+ VSCE_PAT: ${{ secrets.VSCE_PAT }}
33
+ run: npx @vscode/vsce publish --pat $VSCE_PAT
34
+
35
+ - name: Setup npm authentication
36
+ run: |
37
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
38
+
39
+ - name: Publish to npm
40
+ run: npm publish
@@ -0,0 +1,66 @@
1
+ name: Test & Build
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ push:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup Node.js
18
+ uses: actions/setup-node@v4
19
+ with:
20
+ node-version: '20'
21
+ cache: 'npm'
22
+
23
+ - name: Install dependencies
24
+ run: npm ci
25
+
26
+ - name: Run TypeScript compilation check
27
+ run: npx tsc --noEmit
28
+
29
+ - name: Build theme files
30
+ run: npm run build
31
+
32
+ - name: Run tests
33
+ run: npm test
34
+
35
+ - name: Verify theme files exist
36
+ run: |
37
+ if [ ! -f "themes/pierre-light.json" ]; then
38
+ echo "❌ pierre-light.json not generated"
39
+ exit 1
40
+ fi
41
+ if [ ! -f "themes/pierre-dark.json" ]; then
42
+ echo "❌ pierre-dark.json not generated"
43
+ exit 1
44
+ fi
45
+ echo "✅ All theme files generated successfully"
46
+
47
+ - name: Check file sizes
48
+ run: |
49
+ light_size=$(wc -c < themes/pierre-light.json)
50
+ dark_size=$(wc -c < themes/pierre-dark.json)
51
+
52
+ echo "📊 Theme file sizes:"
53
+ echo " - pierre-light.json: $light_size bytes"
54
+ echo " - pierre-dark.json: $dark_size bytes"
55
+
56
+ # Sanity check - themes should be at least 10KB
57
+ if [ $light_size -lt 10000 ]; then
58
+ echo "❌ pierre-light.json seems too small ($light_size bytes)"
59
+ exit 1
60
+ fi
61
+ if [ $dark_size -lt 10000 ]; then
62
+ echo "❌ pierre-dark.json seems too small ($dark_size bytes)"
63
+ exit 1
64
+ fi
65
+
66
+ echo "✅ Theme files are properly sized"
@@ -0,0 +1,5 @@
1
+ {
2
+ "recommendations": [
3
+ "pierrecomputer.pierre-theme"
4
+ ]
5
+ }
@@ -0,0 +1,24 @@
1
+ // A launch configuration that launches the extension inside a new window
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ {
6
+ "version": "0.2.0",
7
+ "configurations": [
8
+ {
9
+ "name": "Run Extension",
10
+ "type": "extensionHost",
11
+ "request": "launch",
12
+ "runtimeExecutable": "${execPath}",
13
+ "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
14
+ "preLaunchTask": "npm: build"
15
+ },
16
+ {
17
+ "name": "Run Extension Without Build",
18
+ "type": "extensionHost",
19
+ "request": "launch",
20
+ "runtimeExecutable": "${execPath}",
21
+ "args": ["--extensionDevelopmentPath=${workspaceFolder}"]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "type": "npm",
6
+ "script": "start",
7
+ "group": {
8
+ "kind": "build",
9
+ "isDefault": true
10
+ },
11
+ "problemMatcher": [],
12
+ "label": "npm: start",
13
+ "detail": "nodemon --watch src src/index.js"
14
+ },
15
+ {
16
+ "type": "npm",
17
+ "script": "build",
18
+ "group": "build",
19
+ "problemMatcher": [],
20
+ "label": "npm: build",
21
+ "detail": "node src/index.js"
22
+ }
23
+ ]
24
+ }
package/.vscodeignore ADDED
@@ -0,0 +1,9 @@
1
+ .vscode/**
2
+ .vscode-test/**
3
+ .changeset/
4
+ .github/
5
+ .gitignore
6
+ /node_modules/
7
+ /package-lock.json
8
+ /src/
9
+ /build/
package/DISPLAY-P3.md ADDED
@@ -0,0 +1,120 @@
1
+ # Display P3 Color Space Implementation
2
+
3
+ This document covers the Display P3 color space implementation for the Pierre theme, including technical details for future reference.
4
+
5
+ ## Overview
6
+
7
+ The vibrant theme variants (`pierre-light-vibrant.json` and `pierre-dark-vibrant.json`) use CSS `color(display-p3 r g b)` format with saturation enhancement to fully utilize Display P3's wider color gamut. These themes are designed for web projects using [Shiki](https://shiki.style/) syntax highlighting. They won't work in VS Code itself, as VS Code only supports hex/RGB color formats.
8
+
9
+ ## Color Conversion Process
10
+
11
+ ### 1. Linear Transformation
12
+
13
+ ```typescript
14
+ // 1. Parse hex → RGB (0-1 range)
15
+ const [r, g, b] = hexToRgb01(hex)
16
+
17
+ // 2. Linearize sRGB (remove gamma)
18
+ const linear = srgbToLinear(rgb)
19
+
20
+ // 3. Transform to P3 color space (matrix transformation)
21
+ const [rP3, gP3, bP3] = linearSrgbToLinearP3(linearR, linearG, linearB)
22
+
23
+ // 4. Apply P3 gamma
24
+ const displayP3 = linearToP3(linearP3)
25
+ ```
26
+
27
+ **Transformation Matrix** (linear sRGB → linear P3):
28
+ ```
29
+ R_p3 = 0.82246197 * R_srgb + 0.17753803 * G_srgb
30
+ G_p3 = 0.03319420 * R_srgb + 0.96680580 * G_srgb
31
+ B_p3 = 0.01708263 * R_srgb + 0.07239744 * G_srgb + 0.91051993 * B_srgb
32
+ ```
33
+
34
+ ### 2. Gamut Enhancement
35
+
36
+ After P3 conversion, colors are enhanced to push into the wider gamut:
37
+
38
+ ```typescript
39
+ // 1. Convert to HSL for easier manipulation
40
+ const [h, s, l] = rgbToHsl(r, g, b)
41
+
42
+ // 2. Skip neutrals (grays, near-blacks/whites)
43
+ if (s < 0.1 || l < 0.1 || l > 0.9) return [r, g, b]
44
+
45
+ // 3. Boost saturation (15-30% based on original)
46
+ const saturationBoost = 0.15 + (s * 0.15)
47
+ const newS = Math.min(1.0, s + (s * saturationBoost))
48
+
49
+ // 4. Boost luminance for vibrant colors (5%)
50
+ let newL = l
51
+ if (s > 0.5 && l < 0.7) {
52
+ newL = Math.min(0.9, l + (l * 0.05))
53
+ }
54
+
55
+ // 5. Convert back to RGB → format as CSS
56
+ return `color(display-p3 ${r} ${g} ${b})`
57
+ ```
58
+
59
+ This enhancement pushes colors into P3 gamut regions not accessible in sRGB, making them noticeably more vibrant on compatible displays.
60
+
61
+ ## Color Examples
62
+
63
+ | Color | sRGB (Standard) | Display P3 (Vibrant) | Notes |
64
+ |--------|-----------------|----------------------|-------|
65
+ | Blue | `#008cff` | `color(display-p3 0.267653 0.570512 1.000000)` | Maxed blue channel |
66
+ | Red | `#ff2e3f` | `color(display-p3 1.000000 0.250216 0.262337)` | Maxed red channel |
67
+ | Purple | `#c635e4` | `color(display-p3 0.770871 0.230698 0.945253)` | Highly saturated |
68
+ | Green | `#0dbe4e` | `color(display-p3 0.298067 0.776115 0.322484)` | Enhanced saturation |
69
+ | Cyan | `#08c0ef` | `color(display-p3 0.327292 0.790977 0.995660)` | Nearly maxed blue |
70
+
71
+ ## Usage with Shiki
72
+
73
+ ```bash
74
+ npm i @pierre/vscode-theme
75
+ ```
76
+
77
+ ```typescript
78
+ import { createHighlighter } from 'shiki'
79
+ import pierreDarkVibrant from 'pierre-vscode-theme/themes/pierre-dark-vibrant.json'
80
+
81
+ const highlighter = await createHighlighter({
82
+ themes: [pierreDarkVibrant],
83
+ langs: ['typescript', 'javascript']
84
+ })
85
+
86
+ const html = highlighter.codeToHtml(code, {
87
+ lang: 'typescript',
88
+ theme: 'Pierre Dark Vibrant'
89
+ })
90
+ ```
91
+
92
+ ## Relevant files
93
+
94
+ - **`src/color-p3.ts`** - Color conversion and enhancement
95
+ - **`src/demo-p3.ts`** - Demo showing conversions (`npx ts-node src/demo-p3.ts`)
96
+ - **`color-comparison.html`** - Visual comparison tool (open in Safari on P3 display)
97
+
98
+ ## Testing
99
+
100
+ ```bash
101
+ # View color conversions
102
+ npx ts-node src/demo-p3.ts
103
+
104
+ # Rebuild themes
105
+ npm run build
106
+
107
+ # Run tests
108
+ npm test
109
+ ```
110
+
111
+ ## Why this matters
112
+
113
+ Unlike typical P3 conversions that just transform color space mathematically, this implementation:
114
+
115
+ 1. **Actually uses the wider gamut** - Pushes colors beyond sRGB constraints
116
+ 2. **Intelligently enhances** - Only boosts saturated colors, preserves neutrals
117
+ 3. **Maintains accuracy** - Grays, blacks, whites stay true
118
+ 4. **Degrades gracefully** - Automatic fallback for non-P3 browsers
119
+
120
+ This makes the themes truly take advantage of modern display technology on compatible hardware.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 The Pierre Computer Company
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Pierre Theme
2
+
3
+ Light and dark themes for Visual Studio Code, Cursor, and Shiki. Built for [Diffs.com](https://diffs.com) by [The Pierre Computer Company](https://pierre.computer).
4
+
5
+ ## Preview
6
+
7
+ ![Pierre dark theme screenshot](https://github.com/user-attachments/assets/e8b2a6e0-995b-4515-997a-f805f4fbc5bf)
8
+ ![Pierre light theme screenshot](https://github.com/user-attachments/assets/2ebb09d0-eb42-4c28-9617-35873d96ed8f)
9
+
10
+ ## Install
11
+
12
+ ### Visual Studio Code
13
+
14
+ From the menu in Visual Studio Code:
15
+
16
+ - View > Extensions (or hit Command+Shift+X or Control+Shift+X)
17
+ - Search for `Pierre Theme`
18
+ - Click install
19
+
20
+ You can also install or download from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=pierrecomputer.pierre-theme).
21
+
22
+ ### Cursor
23
+
24
+ From the menu in Cursor:
25
+
26
+ - View > Extensions (or hit Command+Shift+X or Control+Shift+X)
27
+ - Search for `Pierre Theme`
28
+ - Click install
29
+
30
+ You can also install or download from the [Open VSX registry](https://open-vsx.org/extension/pierrecomputer/pierre-theme).
31
+
32
+ ## Vibrant themes (Display P3)
33
+
34
+ > [!NOTE]
35
+ > Vibrant themes do not work in VS Code or Cursor at this time as it does not support color formats other than Hex or RGB. You can, however, use these with [Diffs](https://diffs.com) or any [Shiki](https://shiki.style) project to render code.
36
+
37
+ The **Vibrant** theme variants use CSS's `color(display-p3 r g b)` format with enhanced saturation to fully utilize Display P3's wider color gamut. Display P3 can represent ~25% more colors than standard sRGB, and these themes are optimized to take full advantage of that on compatible displays.
38
+
39
+ The conversion algorithm transforms sRGB colors to Display P3 through proper linear color space transformations, then enhances saturation (15-30%) and luminance (5% for vibrant colors) to push colors into the wider P3 gamut that isn't accessible in sRGB.
40
+
41
+ ## Override
42
+
43
+ To override this (or any other) theme in your personal config file, please follow the guide in the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation. This is handy for small tweaks to the theme without having to fork and maintain your own theme.
44
+
45
+ ## Contribute
46
+
47
+ 1. Clone and open this [repo](https://github.com/pierrecomputer/theme) in your editor
48
+ 2. Run `npm install` to install the dependencies.
49
+ 3. Press `F5` to open a new window with your extension loaded
50
+ 4. Open `Code > Preferences > Color Theme` [`⌘k ⌘t`] and pick the "Pierre…" theme you want to test.
51
+ 5. Make changes to the [`/src/theme.ts`](https://github.com/pierrecomputer/theme/blob/main/src/theme.ts) file.
52
+ 6. Run `npm run build` to update the theme. You can also run `npm run start` instead to automatically rebuild the theme while making changes and no reloading should be necessary.
53
+ 7. Run `npm test` to validate your changes (this runs automatically on PRs).
54
+ 8. Once you're happy, commit your changes and open a PR.
55
+
56
+ ## Scripts
57
+
58
+ | Script | Description |
59
+ | --- | --- |
60
+ | `npm run build` | Builds the theme `.json` files in `./themes` directory |
61
+ | `npm test` | Runs validation tests on the theme (includes build) |
62
+ | `npm run package` | Compiles the theme `.vsix` file at the project root |
63
+ | `npm start` | Automatically runs build on file change |
64
+
65
+ ## Credit
66
+
67
+ This theme was built on top of [GitHub's Visual Studio Code Theme](https://github.com/primer/github-vscode-theme). All credit to them for the technique and build tooling, which we've since iterated on for more specific language tokens.
@@ -0,0 +1,234 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Pierre Theme - Display P3 Color Comparison</title>
7
+ <style>
8
+ body {
9
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
10
+ max-width: 1200px;
11
+ margin: 40px auto;
12
+ padding: 20px;
13
+ background: #141415;
14
+ color: #fbfbfb;
15
+ }
16
+ h1 { text-align: center; margin-bottom: 40px; }
17
+ .comparison-grid {
18
+ display: grid;
19
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
20
+ gap: 30px;
21
+ margin: 40px 0;
22
+ }
23
+ .color-card {
24
+ background: #1f1f21;
25
+ border-radius: 12px;
26
+ padding: 20px;
27
+ border: 1px solid #39393c;
28
+ }
29
+ .color-card h3 {
30
+ margin-top: 0;
31
+ color: #fbfbfb;
32
+ }
33
+ .color-swatch {
34
+ height: 100px;
35
+ border-radius: 8px;
36
+ margin: 10px 0;
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ font-weight: 600;
41
+ font-family: 'Monaco', 'Courier New', monospace;
42
+ font-size: 12px;
43
+ color: white;
44
+ text-shadow: 0 0 2px rgba(0,0,0,0.5);
45
+ }
46
+
47
+ .label {
48
+ font-size: 12px;
49
+ color: #adadb1;
50
+ margin-bottom: 5px;
51
+ margin-top: 15px;
52
+ }
53
+ .hex-value {
54
+ font-family: 'Monaco', 'Courier New', monospace;
55
+ font-size: 11px;
56
+ color: #c6c6c8;
57
+ margin-top: 5px;
58
+ word-break: break-all;
59
+ }
60
+ .info {
61
+ background: #2e2e30;
62
+ padding: 20px;
63
+ border-radius: 8px;
64
+ margin: 20px 0;
65
+ border-left: 4px solid color(display-p3 0.340 0.734 0.360);
66
+ }
67
+ .info h3 {
68
+ margin-top: 0;
69
+ }
70
+ .p3-notice {
71
+ text-align: center;
72
+ padding: 15px;
73
+ background: #39393c;
74
+ border-radius: 8px;
75
+ margin: 20px 0;
76
+ }
77
+ .supports { color: color(display-p3 0.340 0.734 0.360); }
78
+ .no-support { color: #ff6762; }
79
+
80
+ code {
81
+ background: #2e2e30;
82
+ padding: 2px 6px;
83
+ border-radius: 4px;
84
+ font-size: 13px;
85
+ }
86
+ </style>
87
+ </head>
88
+ <body>
89
+ <h1>Pierre Theme: Display P3 Color Comparison</h1>
90
+
91
+ <div class="p3-notice" id="p3-status">
92
+ Checking Display P3 support...
93
+ </div>
94
+
95
+ <div class="info">
96
+ <h3>About Display P3 Enhanced Colors</h3>
97
+ <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>
98
+ <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>
99
+ <p><strong>Important:</strong> To see the difference, you need a P3-capable display (most Macs from 2015+, iPhones, iPads).</p>
100
+ </div>
101
+
102
+ <div class="comparison-grid">
103
+ <div class="color-card">
104
+ <h3>Blue</h3>
105
+ <div class="label">Standard (sRGB)</div>
106
+ <div class="color-swatch srgb" style="background-color: #008cff;">
107
+ #008cff
108
+ </div>
109
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
110
+ <div class="color-swatch p3" style="background-color: color(display-p3 0.267653 0.570512 1.000000);">
111
+ P3
112
+ </div>
113
+ <div class="hex-value">color(display-p3 0.267653 0.570512 1.000000)</div>
114
+ </div>
115
+
116
+ <div class="color-card">
117
+ <h3>Green</h3>
118
+ <div class="label">Standard (sRGB)</div>
119
+ <div class="color-swatch srgb" style="background-color: #0dbe4e;">
120
+ #0dbe4e
121
+ </div>
122
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
123
+ <div class="color-swatch p3" style="background-color: color(display-p3 0.298067 0.776115 0.322484);">
124
+ P3
125
+ </div>
126
+ <div class="hex-value">color(display-p3 0.298067 0.776115 0.322484)</div>
127
+ </div>
128
+
129
+ <div class="color-card">
130
+ <h3>Red</h3>
131
+ <div class="label">Standard (sRGB)</div>
132
+ <div class="color-swatch srgb" style="background-color: #ff2e3f;">
133
+ #ff2e3f
134
+ </div>
135
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
136
+ <div class="color-swatch p3" style="background-color: color(display-p3 1.000000 0.250216 0.262337);">
137
+ P3
138
+ </div>
139
+ <div class="hex-value">color(display-p3 1.000000 0.250216 0.262337)</div>
140
+ </div>
141
+
142
+ <div class="color-card">
143
+ <h3>Purple</h3>
144
+ <div class="label">Standard (sRGB)</div>
145
+ <div class="color-swatch srgb" style="background-color: #c635e4;">
146
+ #c635e4
147
+ </div>
148
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
149
+ <div class="color-swatch p3" style="background-color: color(display-p3 0.770871 0.230698 0.945253);">
150
+ P3
151
+ </div>
152
+ <div class="hex-value">color(display-p3 0.770871 0.230698 0.945253)</div>
153
+ </div>
154
+
155
+ <div class="color-card">
156
+ <h3>Pink</h3>
157
+ <div class="label">Standard (sRGB)</div>
158
+ <div class="color-swatch srgb" style="background-color: #fc2b73;">
159
+ #fc2b73
160
+ </div>
161
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
162
+ <div class="color-swatch p3" style="background-color: color(display-p3 0.995522 0.233444 0.460772);">
163
+ P3
164
+ </div>
165
+ <div class="hex-value">color(display-p3 0.995522 0.233444 0.460772)</div>
166
+ </div>
167
+
168
+ <div class="color-card">
169
+ <h3>Orange</h3>
170
+ <div class="label">Standard (sRGB)</div>
171
+ <div class="color-swatch srgb" style="background-color: #fe8c2c;">
172
+ #fe8c2c
173
+ </div>
174
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
175
+ <div class="color-swatch p3" style="background-color: color(display-p3 1.000000 0.598672 0.265916);">
176
+ P3
177
+ </div>
178
+ <div class="hex-value">color(display-p3 1.000000 0.598672 0.265916)</div>
179
+ </div>
180
+
181
+ <div class="color-card">
182
+ <h3>Cyan</h3>
183
+ <div class="label">Standard (sRGB)</div>
184
+ <div class="color-swatch srgb" style="background-color: #08c0ef;">
185
+ #08c0ef
186
+ </div>
187
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
188
+ <div class="color-swatch p3" style="background-color: color(display-p3 0.327292 0.790977 0.995660);">
189
+ P3
190
+ </div>
191
+ <div class="hex-value">color(display-p3 0.327292 0.790977 0.995660)</div>
192
+ </div>
193
+
194
+ <div class="color-card">
195
+ <h3>Teal</h3>
196
+ <div class="label">Standard (sRGB)</div>
197
+ <div class="color-swatch srgb" style="background-color: #00c5d2;">
198
+ #00c5d2
199
+ </div>
200
+ <div class="label">Vibrant (Display P3 Enhanced)</div>
201
+ <div class="color-swatch p3" style="background-color: color(display-p3 0.342284 0.816699 0.877157);">
202
+ P3
203
+ </div>
204
+ <div class="hex-value">color(display-p3 0.342284 0.816699 0.877157)</div>
205
+ </div>
206
+ </div>
207
+
208
+ <div class="info">
209
+ <h3>Browser Support</h3>
210
+ <p>CSS <code>color(display-p3 ...)</code> is supported in:</p>
211
+ <ul>
212
+ <li>Safari 10+ (macOS and iOS)</li>
213
+ <li>Chrome 111+</li>
214
+ <li>Firefox 113+</li>
215
+ <li>Edge 111+</li>
216
+ </ul>
217
+ <p>Browsers without P3 support will automatically fall back to the closest sRGB color.</p>
218
+ </div>
219
+
220
+ <script>
221
+ // Check for P3 support
222
+ const supportsP3 = window.matchMedia('(color-gamut: p3)').matches;
223
+ const statusEl = document.getElementById('p3-status');
224
+
225
+ if (supportsP3) {
226
+ 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.';
227
+ statusEl.style.borderLeft = '4px solid color(display-p3 0.340 0.734 0.360)';
228
+ } else {
229
+ 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.';
230
+ statusEl.style.borderLeft = '4px solid #ff6762';
231
+ }
232
+ </script>
233
+ </body>
234
+ </html>
package/icon.png ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@pierre/theme",
3
+ "displayName": "Pierre Theme",
4
+ "description": "Pierre theme for Shiki, VS Code, and more",
5
+ "version": "0.0.18",
6
+ "publisher": "pierrecomputer",
7
+ "icon": "icon.png",
8
+ "galleryBanner": {
9
+ "color": "#141415",
10
+ "theme": "dark"
11
+ },
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/pierrecomputer/theme"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/pierrecomputer/theme/issues"
19
+ },
20
+ "engines": {
21
+ "vscode": "^1.0.0"
22
+ },
23
+ "categories": [
24
+ "Themes"
25
+ ],
26
+ "keywords": [
27
+ "theme",
28
+ "pierre",
29
+ "light",
30
+ "dark"
31
+ ],
32
+ "contributes": {
33
+ "themes": [
34
+ {
35
+ "label": "Pierre Light",
36
+ "uiTheme": "vs",
37
+ "path": "./themes/pierre-light.json"
38
+ },
39
+ {
40
+ "label": "Pierre Dark",
41
+ "uiTheme": "vs-dark",
42
+ "path": "./themes/pierre-dark.json"
43
+ }
44
+ ]
45
+ },
46
+ "scripts": {
47
+ "build": "ts-node src/build.ts",
48
+ "test": "npm run build && ts-node src/test.ts",
49
+ "start": "nodemon --watch src --ext ts --exec npm run build",
50
+ "package": "ts-node src/package-vsix.ts"
51
+ },
52
+ "devDependencies": {
53
+ "nodemon": "^3.1.11",
54
+ "ts-node": "^10.9.2",
55
+ "typescript": "^5.9.3",
56
+ "@vscode/vsce": "^3.2.2"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public"
60
+ }
61
+ }