diff options
author | Grail Finder <wohilas@gmail.com> | 2025-09-05 08:55:05 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-09-05 08:55:05 +0300 |
commit | 0068cd17ff1985102dd5ab22df899ea6b1065ff0 (patch) | |
tree | 92f6af2c64609ae1aafb74a744c18ad2544afe72 /tui.go | |
parent | a21664fe927b3a826570d74b91b665da2b615b5f (diff) |
Chore: add colorschemes
Diffstat (limited to 'tui.go')
-rw-r--r-- | tui.go | 69 |
1 files changed, 55 insertions, 14 deletions
@@ -76,6 +76,60 @@ var ( Press Enter to go back ` + colorschemes = map[string]tview.Theme{ + "default": tview.Theme{ + PrimitiveBackgroundColor: tcell.ColorDefault, + ContrastBackgroundColor: tcell.ColorGray, + MoreContrastBackgroundColor: tcell.ColorSteelBlue, + BorderColor: tcell.ColorGray, + TitleColor: tcell.ColorRed, + GraphicsColor: tcell.ColorBlue, + PrimaryTextColor: tcell.ColorLightGray, + SecondaryTextColor: tcell.ColorYellow, + TertiaryTextColor: tcell.ColorOrange, + InverseTextColor: tcell.ColorPurple, + ContrastSecondaryTextColor: tcell.ColorLime, + }, + "gruvbox": tview.Theme{ + PrimitiveBackgroundColor: tcell.ColorBlack, // Matches #1e1e2e + ContrastBackgroundColor: tcell.ColorDarkGoldenrod, // Selected option: warm yellow (#b57614) + MoreContrastBackgroundColor: tcell.ColorDarkSlateGray, // Non-selected options: dark grayish-blue (#32302f) + BorderColor: tcell.ColorLightGray, // Light gray (#a89984) + TitleColor: tcell.ColorRed, // Red (#fb4934) + GraphicsColor: tcell.ColorDarkCyan, // Cyan (#689d6a) + PrimaryTextColor: tcell.ColorLightGray, // Light gray (#d5c4a1) + SecondaryTextColor: tcell.ColorYellow, // Yellow (#fabd2f) + TertiaryTextColor: tcell.ColorOrange, // Orange (#fe8019) + InverseTextColor: tcell.ColorWhite, // White (#f9f5d7) for selected text + ContrastSecondaryTextColor: tcell.ColorLightGreen, // Light green (#b8bb26) + }, + "solarized": tview.Theme{ + PrimitiveBackgroundColor: tcell.NewHexColor(0x1e1e2e), // #1e1e2e for main dropdown box + ContrastBackgroundColor: tcell.ColorDarkCyan, // Selected option: cyan (#2aa198) + MoreContrastBackgroundColor: tcell.ColorDarkSlateGray, // Non-selected options: dark blue (#073642) + BorderColor: tcell.ColorLightBlue, // Light blue (#839496) + TitleColor: tcell.ColorRed, // Red (#dc322f) + GraphicsColor: tcell.ColorBlue, // Blue (#268bd2) + PrimaryTextColor: tcell.ColorWhite, // White (#fdf6e3) + SecondaryTextColor: tcell.ColorYellow, // Yellow (#b58900) + TertiaryTextColor: tcell.ColorOrange, // Orange (#cb4b16) + InverseTextColor: tcell.ColorWhite, // White (#eee8d5) for selected text + ContrastSecondaryTextColor: tcell.ColorLightCyan, // Light cyan (#93a1a1) + }, + "dracula": tview.Theme{ + PrimitiveBackgroundColor: tcell.NewHexColor(0x1e1e2e), // #1e1e2e for main dropdown box + ContrastBackgroundColor: tcell.ColorDarkMagenta, // Selected option: magenta (#bd93f9) + MoreContrastBackgroundColor: tcell.ColorDarkGray, // Non-selected options: dark gray (#44475a) + BorderColor: tcell.ColorLightGray, // Light gray (#f8f8f2) + TitleColor: tcell.ColorRed, // Red (#ff5555) + GraphicsColor: tcell.ColorDarkCyan, // Cyan (#8be9fd) + PrimaryTextColor: tcell.ColorWhite, // White (#f8f8f2) + SecondaryTextColor: tcell.ColorYellow, // Yellow (#f1fa8c) + TertiaryTextColor: tcell.ColorOrange, // Orange (#ffb86c) + InverseTextColor: tcell.ColorWhite, // White (#f8f8f2) for selected text + ContrastSecondaryTextColor: tcell.ColorLightGreen, // Light green (#50fa7b) + }, + } ) func loadImage() { @@ -318,20 +372,7 @@ func makePropsForm(props map[string]float32) *tview.Form { } func init() { - theme := tview.Theme{ - PrimitiveBackgroundColor: tcell.ColorDefault, - ContrastBackgroundColor: tcell.ColorGray, - MoreContrastBackgroundColor: tcell.ColorNavy, - BorderColor: tcell.ColorGray, - TitleColor: tcell.ColorRed, - GraphicsColor: tcell.ColorBlue, - PrimaryTextColor: tcell.ColorLightGray, - SecondaryTextColor: tcell.ColorYellow, - TertiaryTextColor: tcell.ColorOrange, - InverseTextColor: tcell.ColorPurple, - ContrastSecondaryTextColor: tcell.ColorLime, - } - tview.Styles = theme + tview.Styles = colorschemes["default"] app = tview.NewApplication() pages = tview.NewPages() textArea = tview.NewTextArea(). |