A dark theme for copyparty. One stylesheet, no build step, WCAG AA contrast.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gaurav Gosain 63509c45f3 keep the theme to colour only
The JS label swap replaced copyparty's emoji with words, but copyparty sizes
those controls for a single glyph (font-size 1.5em, aspect-ratio 1/1). Making
the top nav fit meant every other context, tree toolbar, settings toggles, the
fixed bottom widget, needed its own layout override, and partial coverage left
the UI reading as half words and half pictures.

Colour alone is a clean win and cannot break layout, so that is what this is.
2026-09-13 20:18:12 +04:00
.gitignore slate: a dark theme for copyparty 2026-09-13 19:55:57 +04:00
LICENSE slate: a dark theme for copyparty 2026-09-13 19:55:57 +04:00
README.md keep the theme to colour only 2026-09-13 20:18:12 +04:00
slate.css slate: a dark theme for copyparty 2026-09-13 19:55:57 +04:00

slate

A dark theme for copyparty.

copyparty exposes about 157 CSS custom properties. This is a single stylesheet that redefines the ones driving appearance and touches nothing else, so every feature keeps working: resumable uploads, share links, WebDAV, the media player.

No build step, no JavaScript, no extra service. One CSS file.

Design

Neutral dark surfaces with a single cool accent. Flat rather than glossy: inner shadows and glows are removed, separation comes from lines and elevation steps. Sizes and timestamps use tabular numerals so columns line up.

Every foreground and background pair is WCAG AA or better. The lowest ratio is 6.85, for muted text on the base surface. Most pairs are AAA.

Token Value Role
--slate-base #0f1115 page background
--slate-sunk #0a0c10 recessed areas, tree, inputs
--slate-r1 #151821 raised one step
--slate-r2 #1b1f2a raised two steps
--slate-r3 #232834 raised three steps
--slate-line #2b3140 borders
--slate-text #d6dae3 body text
--slate-bright #f4f6fa emphasis
--slate-muted #949cad secondary text
--slate-accent #6aa9f4 links, focus, primary buttons

Status colours are #78c99a ok, #e0b357 warning, #e88c8c error.

Install

Put slate.css somewhere the browser can fetch, then point copyparty at it.

Serving it through a reverse proxy keeps it outside copyparty's auth, so the stylesheet loads on the login page too. With Caddy:

files.example.com {
    handle_path /_theme/* {
        root * /var/lib/copyparty/theme
        file_server
    }
    reverse_proxy 127.0.0.1:3923
}

Then in your copyparty config:

[global]
  css-browser: /_theme/slate.css

or on the command line:

copyparty --css-browser /_theme/slate.css

Restart copyparty. Confirm it is loading:

curl -s -A "Mozilla/5.0" https://files.example.com/ | grep slate.css

You should see it listed after copyparty's own stylesheets, which is what lets the overrides take effect.

Removing it

Delete the css-browser line and restart. Nothing else changes; the stock theme comes back. This sheet adds no state and no dependencies.

Notes

The selector targets the base html element and copyparty's built in theme classes (a through e and their dark variants), so it applies whichever of the ten stock themes is selected.

Two small structural rules go beyond recolouring: row separation uses a hairline instead of banding, and form inputs get a flat border with an accent focus ring. Both are near the bottom of the file and easy to delete if you want colours only.

Licence

MIT.