feat: make GoSentry light theme boldly branded

Give the light variant a soft teal window canvas with white inputs,
menus, dialogs, and buttons on top, plus teal-tinted separators, input
borders, and table headers. Cards and fields now lift off a branded
background instead of reading as a plain accent swap on gray. Text stays
dark (delegated to the base foreground) for high contrast on both the
teal canvas and the white surfaces.

Lock the teal canvas and white input background into the theme tests so
the light look cannot silently regress.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-07-26 11:15:35 +03:00
parent d3e3d30b42
commit 2c684532da
2 changed files with 24 additions and 9 deletions
+14 -1
View File
@@ -30,6 +30,12 @@ var (
// gosentryLight and gosentryDark hold only the colors the brand theme overrides;
// every other ColorName falls through to the base theme, which keeps neutral
// surfaces and text contrast correct in both variants.
//
// The light variant is intentionally more than an accent swap: the window canvas
// is a soft teal while inputs, menus, and dialogs stay white, so cards and fields
// lift off a branded background instead of sitting on plain gray. Text stays dark
// (delegated to the base foreground), which keeps high contrast on both the teal
// canvas and the white surfaces.
var gosentryLight = map[fyne.ThemeColorName]color.Color{
theme.ColorNamePrimary: brandTeal,
theme.ColorNameFocus: brandAmber,
@@ -37,7 +43,14 @@ var gosentryLight = map[fyne.ThemeColorName]color.Color{
theme.ColorNameSuccess: color.NRGBA{R: 0x2E, G: 0x9E, B: 0x5B, A: 0xFF},
theme.ColorNameWarning: brandAmber,
theme.ColorNameError: color.NRGBA{R: 0xD6, G: 0x45, B: 0x45, A: 0xFF},
theme.ColorNameBackground: color.NRGBA{R: 0xF5, G: 0xF7, B: 0xF8, A: 0xFF},
theme.ColorNameBackground: color.NRGBA{R: 0xDC, G: 0xEA, B: 0xED, A: 0xFF}, // teal canvas
theme.ColorNameButton: color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF},
theme.ColorNameInputBackground: color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF},
theme.ColorNameMenuBackground: color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF},
theme.ColorNameOverlayBackground: color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF},
theme.ColorNameHeaderBackground: color.NRGBA{R: 0xC7, G: 0xDE, B: 0xE2, A: 0xFF}, // deeper teal for table headers
theme.ColorNameSeparator: color.NRGBA{R: 0xB4, G: 0xD0, B: 0xD6, A: 0xFF},
theme.ColorNameInputBorder: color.NRGBA{R: 0xB4, G: 0xD0, B: 0xD6, A: 0xFF},
theme.ColorNameSelection: color.NRGBA{R: 0x0A, G: 0x4A, B: 0x58, A: 0x33},
theme.ColorNameHover: color.NRGBA{R: 0x0A, G: 0x4A, B: 0x58, A: 0x14},
}
+2
View File
@@ -24,6 +24,8 @@ func TestGoSentryThemeBrandColors(t *testing.T) {
}{
{"light primary is teal", theme.ColorNamePrimary, 0, brandTeal},
{"light focus is amber", theme.ColorNameFocus, 0, brandAmber},
{"light canvas is a teal tint", theme.ColorNameBackground, 0, color.NRGBA{R: 0xDC, G: 0xEA, B: 0xED, A: 0xFF}},
{"light inputs stay white", theme.ColorNameInputBackground, 0, color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF}},
{"dark primary is lifted teal", theme.ColorNamePrimary, 1, brandTealLight},
{"dark focus is amber", theme.ColorNameFocus, 1, brandAmber},
}