aboutsummaryrefslogtreecommitdiffhomepage
path: root/model/theme.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/theme.go')
-rw-r--r--model/theme.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/model/theme.go b/model/theme.go
index 5d32df4..f58f91c 100644
--- a/model/theme.go
+++ b/model/theme.go
@@ -15,6 +15,18 @@ func Themes() map[string]string {
}
}
+// ThemeColor returns the color for the address bar or/and the browser color.
+// https://developer.mozilla.org/en-US/docs/Web/Manifest#theme_color
+// https://developers.google.com/web/tools/lighthouse/audits/address-bar
+func ThemeColor(theme string) string {
+ switch theme {
+ case "black":
+ return "#222"
+ default:
+ return "#fff"
+ }
+}
+
// ValidateTheme validates theme value.
func ValidateTheme(theme string) error {
for key := range Themes() {