Repository navigation
Description
Rehearsal copy on my own fork. It walks through issue, PR and merge here first. The real issue goes to morluto/rea later.
TL;DR: rea.tools has no dark mode, so it is very bright at night. The site keeps its main colors in six CSS variables, so most of a dark theme is small. The figures need their own edits. I'll build one here as a rehearsal.
Before submitting
- I searched the open and closed issues and pull requests for a related proposal.
- I removed credentials, tokens, private paths, and sensitive target data.
Area
Documentation
Current limitation
The website only has a light theme. website/public/assets/styles.css sets color-scheme: light on :root. So a reader whose system is set to dark still gets a white page. That is hard on the eyes at night.
Use cases
- Reading a guide at night, or in a dark room.
- Readers who keep their whole system in dark mode.
Desired outcome and success criteria
- With the system set to dark, the site uses a dark theme. With it set to light, nothing changes.
- Text, links and code keep good contrast. The dark colors below all pass WCAG AAA (7:1 or more). The light theme does not change.
- The figures and code highlights stay readable on the dark page.
- The figures keep every label, value and arrow. Only colors change.
- Checked in both schemes at 320 px and 1280 px, at the site root and under
/rea/. python3 scripts/website.py checkstill passes.
Authority boundaries and non-goals
- No toggle button and no saved setting. It follows the system setting only.
- No new layout, fonts or effects. The style guide's look stays the same.
- Only the website. Not the VitePress docs build.
- The sharing image stays light. Link previews ignore the system setting.
Alternatives considered
- A toggle button. It needs JavaScript and storage, so I left it out.
- Leaving it to browser dark-mode add-ons. Those often break diagrams and code blocks.
Possible direction
- Add a
@media (prefers-color-scheme: dark)block that setscolor-scheme: darkand swaps the six variables. - The stylesheet also has 37 fixed colors: 32 hex values and five uses of
white. Swap them, or move them into variables first. - The 5 SVG figures all have white fills. Pages load them with
<img>, so page CSS cannot restyle them. Each needs its own@media (prefers-color-scheme: dark)block inside the file, or a light backing on the dark page. One figure,th04-bullet-ring.svg, already has a<style>block to extend. - Swap
::selection(styles.cssline 38) and give the dark agent terminals a visible border. Their#202933background is almost the same as the dark page. - Add a dark
theme-colormeta tag. The light one is inwebsite/templates/page.htmland 17 pages. - The blog page
blog/touhou-reconstruction/index.htmlhas five inline arrow strokes with fixed colors. The dinosaur game inassets/dino-demo.jsdraws with fixed colors too. - Add a dark column to the color table in
website/style-guide.md, so the guide stays the source of truth.
I'd suggest the colors of Catppuccin Mocha, an MIT-licensed palette. A mapping is in the fold below. I'm happy to use any other dark colors you prefer.
References
website/style-guide.md, "Use the existing visual system", lists the six variables. They are set inwebsite/public/assets/styles.csslines 1 to 8, withcolor-scheme: lighton line 2. Main at 0ecf3f2.- The Catppuccin palette is under the MIT license.
The dark colors I propose
| Variable | Light now | Dark (Catppuccin Mocha) |
|---|---|---|
--page |
#ffffff |
#1e1e2e (base) |
--ink |
#20252b |
#cdd6f4 (text) |
--muted |
#5b6570 |
#a6adc8 (subtext0) |
--line |
#e0e5e9 |
#45475a (surface1) |
--soft |
#f4f6f8 |
#181825 (mantle) |
--accent |
#294f82 |
#89b4fa (blue) |
Contrast ratios, computed with the WCAG formula:
| Pair | Light now | Dark |
|---|---|---|
| Main text on page | 15.4:1 | 11.3:1 |
| Secondary text on page | 5.9:1 | 7.4:1 |
| Links on page | 8.3:1 | 7.8:1 |
🤖 Generated with Claude Code (Opus 5.5, verified by Fable 5.1) 🦊
Activity
fix(website): keep text inside small screens and lift tiny labels
style(website): line up the home page's columns, corners and gaps
style(website): soften chips, terminals and the hero button in dark
feat(website): follow the system dark mode (#5)
feat(website): give the five SVG figures a dark scheme (#8)
CassieFox23 commentedon Oct 11, 2026
Done in #5 and #8, merged into
rehearsalas 2b5b756 and 4965224. The same work went upstream as morluto#1894, merged as 12ee785.🤖 Generated with Claude Code (Opus 5.5) 🦊
feat(ghidra): support raw big-endian m68k analysis (morluto#4018)