Skip to content

Commit 2ba7b04

Browse files
committed
feat: initial release — Dath v0.1.0
CVD colour correction (deuteranopia, protanopia, tritanopia) via LMS daltonization over any VS Code theme. Contrast comfort modes, warmth bias, CVD-safe rainbow brackets with shape hints, custom palette slots, font and spacing overrides, named profiles, interactive panel with live preview and per-section resets. Non-destructive — works as an override layer, never touches theme files.
0 parents  commit 2ba7b04

24 files changed

Lines changed: 6912 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
cache: 'npm'
18+
- run: npm ci
19+
- run: npm run lint
20+
- run: npm run compile

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
out/
3+
*.vsix
4+
.vscode-test/

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
9+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
10+
"preLaunchTask": "${defaultBuildTask}"
11+
}
12+
]
13+
}

.vscode/tasks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "npm: compile",
6+
"type": "npm",
7+
"script": "compile",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"problemMatcher": ["$tsc"],
13+
"detail": "tsc -p ./"
14+
},
15+
{
16+
"label": "npm: watch",
17+
"type": "npm",
18+
"script": "watch",
19+
"problemMatcher": ["$tsc-watch"],
20+
"isBackground": true,
21+
"detail": "tsc -watch -p ./"
22+
}
23+
]
24+
}

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Changelog
2+
3+
All notable changes to Dath will be documented here.
4+
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6+
7+
---
8+
9+
## [0.1.0] — 2026-05-07
10+
11+
Initial release.
12+
13+
### Added
14+
15+
#### CVD Colour Correction
16+
17+
- LMS daltonization engine based on Brettel, Viénot & Mollon (1997) — zero external dependencies
18+
- Correction modes: `deuteranopia`, `protanopia`, `tritanopia`
19+
- Severity slider (0.1–1.0) for partial CVD correction
20+
- Corrects 185 workbench UI colour tokens (editor, sidebar, tabs, terminal, diff, minimap, and more)
21+
- Corrects TextMate syntax token colours read directly from the active theme file on disk
22+
- JSONC comment stripping and `include` chain resolution for theme file parsing
23+
- Custom palette slots (`custom1`, `custom2`, `custom3`) with per-role colour pickers in the panel
24+
- Semantic role matching (String, Keyword, Function, Comment, Error, Warning, Added, Deleted, Modified) for custom palettes
25+
26+
#### Visual Comfort
27+
28+
- Contrast modes: `soften`, `warm`, `cool`, `dim`
29+
- Contrast strength slider (0.1–1.0)
30+
- Warmth/temperature bias slider (−1.0 to +1.0) for persistent hue tint on top of all corrections
31+
32+
#### Rainbow Brackets
33+
34+
- CVD-safe bracket palettes derived from the Wong (2011) colour palette
35+
- Per-CVD-mode palettes — automatically matched to the active correction mode
36+
- Shape hints (underline) via TextMate rules for colour-independent pair identification
37+
38+
#### Font & Spacing
39+
40+
- Font family override — quick picks for OpenDyslexic, Atkinson Hyperlegible, and Lexie Readable
41+
- Free-text font input — type any font installed on the system
42+
- Font size override (px)
43+
- Line height override
44+
- Letter spacing override (px)
45+
46+
#### Panel
47+
48+
- Live interactive webview control surface — changes apply immediately
49+
- CVD mode button group (none / deuteranopia / protanopia / tritanopia / custom1 / custom2 / custom3)
50+
- Severity, contrast strength, and warmth bias sliders with live label updates
51+
- Contrast mode button group
52+
- Rainbow bracket and shape hint toggles
53+
- Font family buttons and free-text input
54+
- Font size, line height, and letter spacing sliders
55+
- Per-section reset buttons (CVD, Visual Comfort, Brackets, Font & Spacing)
56+
- Global reset to defaults
57+
- Colour correction live preview — before/after swatches for representative theme colours
58+
- Inline colour pickers on swatches in custom palette mode
59+
- Bracket palette preview (swatches + live code sample)
60+
- Profile management (apply saved profiles, save new profiles)
61+
62+
#### Profiles
63+
64+
- Named configuration profiles — save, apply, and delete
65+
- Three built-in starter profiles seeded on first install: Deuteranopia, Protanopia, Dyslexia Comfort
66+
- Profiles capture all settings: CVD mode and severity, contrast, brackets, font family, font size, line height, letter spacing
67+
68+
#### Core
69+
70+
- Status bar item — shows active profile or CVD mode, click to open panel
71+
- Setup wizard (onboarding) — CVD type, contrast preference, rainbow brackets, shape hints
72+
- Non-destructive operation — writes only to `workbench.colorCustomizations` and `editor.tokenColorCustomizations` overlay; theme files are never modified
73+
- Fire-and-forget activation to prevent blocking command registration
74+
- Theme cache with invalidation on theme change
75+
- Manual colour correction fallback (clipboard copy) when theme file cannot be read
76+
77+
---
78+
79+
## [Unreleased]
80+
81+
Nothing yet.

LICENSE

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
PolyForm Noncommercial License 1.0.0
2+
3+
Copyright (c) 2026 Ryan James
4+
5+
Acceptance
6+
7+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
8+
9+
Copyright License
10+
11+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to Distribution License and make changes or new works based on the software according to Changes and New Works License.
12+
13+
Distribution License
14+
15+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by Changes and New Works License.
16+
17+
Notices
18+
19+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with Required Notice: that the licensor provided with the software. For example:
20+
21+
Required Notice: Copyright (c) 2026 Ryan James
22+
23+
Changes and New Works License
24+
25+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
26+
27+
Patent License
28+
29+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
30+
31+
Noncommercial Purposes
32+
33+
Any noncommercial purpose is a permitted purpose.
34+
35+
Personal Uses
36+
37+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
38+
39+
Noncommercial Organizations
40+
41+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
42+
43+
Fair Use
44+
45+
You may have "fair use" rights for the software under the law. These terms do not limit them.
46+
47+
No Other Rights
48+
49+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
50+
51+
Patent Defense
52+
53+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your employer makes such a claim, your patent license ends immediately for work on behalf of your employer.
54+
55+
Violations
56+
57+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into compliance within 32 days after receiving notice. Otherwise, all your licenses end permanently.
58+
59+
No Liability
60+
61+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
62+
63+
Definitions
64+
65+
The licensor is the individual or entity offering these terms, and the software is the software the licensor makes available under these terms.
66+
67+
You refers to the individual or entity agreeing to these terms.
68+
69+
Your company is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and legal affairs.
70+
71+
Your licenses are all the licenses granted to you for the software under these terms.
72+
73+
Use means anything you do with the software requiring one of your licenses.
74+
75+
Trademark
76+
77+
The licensor has not granted you any right to use any trademark, service mark, trade name, or logo of the licensor.

0 commit comments

Comments
 (0)