Pure #000 background (OLED pixels off), near-black panels with dark red borders, and a red accent (#e0263a) that passes 4.5:1 as text on black and behind white button labels. Badges use a brighter red to stay legible on their tinted background. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
823 B
Go
37 lines
823 B
Go
package server
|
|
|
|
// Theme is a built-in color preset. The actual colors live in
|
|
// web/static/css/themes.css under [data-theme="<key>"].
|
|
type Theme struct {
|
|
Key string `json:"key"`
|
|
Label string `json:"label"`
|
|
Dark bool `json:"dark"`
|
|
}
|
|
|
|
var Themes = []Theme{
|
|
{"midnight", "Midnight", true},
|
|
{"obsidian", "Obsidian", true},
|
|
{"nord", "Nord", true},
|
|
{"dracula", "Dracula", true},
|
|
{"mocha", "Mocha", true},
|
|
{"rose-pine", "Rosé Pine", true},
|
|
{"gruvbox", "Gruvbox", true},
|
|
{"forest", "Forest", true},
|
|
{"synthwave", "Synthwave", true},
|
|
{"crimson", "Crimson", true},
|
|
{"daylight", "Daylight", false},
|
|
{"paper", "Paper", false},
|
|
{"latte", "Latte", false},
|
|
}
|
|
|
|
const DefaultTheme = "midnight"
|
|
|
|
func validTheme(key string) bool {
|
|
for _, t := range Themes {
|
|
if t.Key == key {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|