Commit 9b0b764
authored
fix(themes): correct highcontrast text color to #ffffff for WCAG comp… (JhaSourav07#1207)
## Description
Fixes JhaSourav07#1200
The `highcontrast` theme in `lib/svg/themes.ts` had its text color set
to `#888888`
(medium gray) on a background of `#0a0a0a` (near-black). This produced a
contrast
ratio of only ~3.5:1 — below the WCAG AA minimum of 4.5:1 and completely
contradicting the purpose of a theme named `highcontrast`.
Changed text color to `#ffffff` (white), achieving a contrast ratio of
~21:1,
which passes WCAG AAA — the highest accessibility standard.
## Pillar
- [ ] 🎨 Pillar 1 — New Theme Design
- [ ] 📐 Pillar 2 — Geometric SVG Improvement
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
| Before ❌ (~3.5:1 contrast ratio) | After ✅ (~21:1 contrast ratio) |
|---|---|
| <img width="1198" height="841" alt="image"
src="https://github.com/user-attachments/assets/613f6bbd-3a50-46ed-93bc-2f94cabd34dd"
/> | <img width="1201" height="841" alt="image"
src="https://github.com/user-attachments/assets/39ac4164-85fa-4d62-973a-e2e68f522730"
/> |
## Changes Made
- `lib/svg/themes.ts` — changed `highcontrast` text from `888888` to
`ffffff`
- `THEMES.md` — updated theme gallery table to reflect new text color
- `README.md` — updated theme presets table to reflect new text color
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=jhasourav07&theme=highcontrast`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors.
- [x] My commits follow the Conventional Commits format (`fix(themes):
...`).
- [x] I have updated `README.md` as I modified an existing theme.
- [x] I have starred the repo.
- [x] I have made sure that I have only one commit to merge in this PR.
- [x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard.3 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments