- Python 92.6%
- Shell 7.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| dist | ||
| colors.py | ||
| generate.py | ||
| install-themes.sh | ||
| LICENSE | ||
| palettes.py | ||
| preview.py | ||
| README.md | ||
amethystic Forgejo theme pack
There are 23 themes for git.amethystic.dev: 9 families, each with its own UI style, in dark, light and auto (follows your OS setting). Every theme passes WCAG AA contrast, and body text passes AAA.
| Family | Style | Variants | Mood |
|---|---|---|---|
| Amethyst | Soft | dark · light · auto | The house theme. Violet dusk and lavender paper |
| Fjord | Crisp | dark · light · auto | Cold slate water and glacier blue |
| Ember | Soft | dark · light · auto | Charcoal and coals, or cream and terracotta |
| Moss | Crisp | dark · light · auto | Lichen greens on deep pine |
| Sakura | Soft | dark · light · auto | Cherry blossom on night ink |
| Graphite | Sharp | dark · light · auto | Monochrome and square |
| Paper | Editorial | light · dark · auto | Oxblood ink on warm stock, serif headings |
| Phosphor | Terminal | dark | A green CRT, monospace everywhere |
| Void | Soft | dark | True black for OLED, electric cyan |
UI styles:
- Soft: 9 px corners and a gradient accent bar on the navbar.
- Crisp: 5 px corners and a thin accent line.
- Sharp: square corners and no ornament.
- Terminal: monospace UI with glowing headings.
- Editorial: serif README headings.
Open dist/preview.html in a browser to compare them all on a mock repo page.
Install
On the Forgejo Linode:
scp -r forgejo-themes you@amethystic.dev:~
ssh you@amethystic.dev
cd ~/forgejo-themes
sudo ./install-themes.sh amethyst-auto # the argument (optional) sets the site default
Then pick one under Settings → Appearance → Theme. Hard-refresh the page once (Ctrl/Cmd + Shift + R) if the colours look stale.
The script does four things:
- Copies
dist/css/theme-*.cssto/var/lib/forgejo/custom/public/assets/css/. - Writes
THEMES(your pack plus the built-in Forgejo and Gitea themes) and, if you passed one,DEFAULT_THEMEinto the[ui]section of/etc/forgejo/app.ini. - Backs up the config to
app.ini.bak-themes. - Restarts Forgejo and waits until it reports healthy.
It's safe to re-run. sudo ./install-themes.sh --uninstall removes the pack and returns to Forgejo's defaults.
Make your own
Every colour comes from a short entry in palettes.py:
{"mode": "dark", "primary": "#a98bff", "accent2": "#f0a6ff", "hue": 298, "chroma": 0.028}
primaryis the colour for links, buttons, focus rings and selections.hueandchromatint the surfaces and text (OKLCH). Chroma0gives pure grey,0.03a clear tint.accent2is the second colour of the Soft-style navbar gradient.levels(optional) overrides the lightness of individual surfaces (see Phosphor and Void).
python3 generate.py # rebuilds dist/css, dist/preview.html, dist/themes.txt
sudo ./install-themes.sh
generate.py checks nine contrast pairs for every theme, including text, muted text, links, button labels, the navbar and the Actions console. It exits non-zero if any pair fails. If a primary colour is too weak to read as a link, it nudges it until it reaches 4.5:1 and prints what it changed. To add a UI style, add an entry to STYLES in palettes.py.
How the themes are built
Each file first imports Forgejo's own theme-forgejo-dark.css or theme-forgejo-light.css. That provides syntax highlighting, editor colours and the semantic reds, greens and yellows used for diffs and status. The file then overrides about 120 variables: the full primary and secondary scales, every surface, the text ramp, inputs, menus, tooltips, labels, the Actions console and the corner radii. A small style layer adds the navbar accent, the selection colour and scrollbar tint, and fonts.
If a Forgejo update adds or renames a colour variable, that one spot falls back to Forgejo's built-in colour instead of breaking. After a major upgrade, look around once and re-run generate.py if anything needs adjusting.