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:
+22
-9
@@ -30,16 +30,29 @@ var (
|
|||||||
// gosentryLight and gosentryDark hold only the colors the brand theme overrides;
|
// gosentryLight and gosentryDark hold only the colors the brand theme overrides;
|
||||||
// every other ColorName falls through to the base theme, which keeps neutral
|
// every other ColorName falls through to the base theme, which keeps neutral
|
||||||
// surfaces and text contrast correct in both variants.
|
// 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{
|
var gosentryLight = map[fyne.ThemeColorName]color.Color{
|
||||||
theme.ColorNamePrimary: brandTeal,
|
theme.ColorNamePrimary: brandTeal,
|
||||||
theme.ColorNameFocus: brandAmber,
|
theme.ColorNameFocus: brandAmber,
|
||||||
theme.ColorNameHyperlink: brandTealMid,
|
theme.ColorNameHyperlink: brandTealMid,
|
||||||
theme.ColorNameSuccess: color.NRGBA{R: 0x2E, G: 0x9E, B: 0x5B, A: 0xFF},
|
theme.ColorNameSuccess: color.NRGBA{R: 0x2E, G: 0x9E, B: 0x5B, A: 0xFF},
|
||||||
theme.ColorNameWarning: brandAmber,
|
theme.ColorNameWarning: brandAmber,
|
||||||
theme.ColorNameError: color.NRGBA{R: 0xD6, G: 0x45, B: 0x45, A: 0xFF},
|
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.ColorNameSelection: color.NRGBA{R: 0x0A, G: 0x4A, B: 0x58, A: 0x33},
|
theme.ColorNameButton: color.NRGBA{R: 0xFF, G: 0xFF, B: 0xFF, A: 0xFF},
|
||||||
theme.ColorNameHover: color.NRGBA{R: 0x0A, G: 0x4A, B: 0x58, A: 0x14},
|
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},
|
||||||
}
|
}
|
||||||
|
|
||||||
var gosentryDark = map[fyne.ThemeColorName]color.Color{
|
var gosentryDark = map[fyne.ThemeColorName]color.Color{
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ func TestGoSentryThemeBrandColors(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{"light primary is teal", theme.ColorNamePrimary, 0, brandTeal},
|
{"light primary is teal", theme.ColorNamePrimary, 0, brandTeal},
|
||||||
{"light focus is amber", theme.ColorNameFocus, 0, brandAmber},
|
{"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 primary is lifted teal", theme.ColorNamePrimary, 1, brandTealLight},
|
||||||
{"dark focus is amber", theme.ColorNameFocus, 1, brandAmber},
|
{"dark focus is amber", theme.ColorNameFocus, 1, brandAmber},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user