2018-01-10 16:43:32 +08:00
|
|
|
package tview
|
|
|
|
|
2020-10-18 20:15:57 +08:00
|
|
|
import "github.com/gdamore/tcell/v2"
|
2018-01-10 16:43:32 +08:00
|
|
|
|
2019-03-09 21:04:59 +08:00
|
|
|
// Theme defines the colors used when primitives are initialized.
|
2018-12-06 01:17:01 +08:00
|
|
|
type Theme struct {
|
2018-01-10 16:43:32 +08:00
|
|
|
PrimitiveBackgroundColor tcell.Color // Main background color for primitives.
|
|
|
|
ContrastBackgroundColor tcell.Color // Background color for contrasting elements.
|
|
|
|
MoreContrastBackgroundColor tcell.Color // Background color for even more contrasting elements.
|
|
|
|
BorderColor tcell.Color // Box borders.
|
|
|
|
TitleColor tcell.Color // Box titles.
|
|
|
|
GraphicsColor tcell.Color // Graphics.
|
|
|
|
PrimaryTextColor tcell.Color // Primary text.
|
|
|
|
SecondaryTextColor tcell.Color // Secondary text (e.g. labels).
|
|
|
|
TertiaryTextColor tcell.Color // Tertiary text (e.g. subtitles, notes).
|
|
|
|
InverseTextColor tcell.Color // Text on primary-colored backgrounds.
|
2018-03-16 00:14:14 +08:00
|
|
|
ContrastSecondaryTextColor tcell.Color // Secondary text on ContrastBackgroundColor-colored backgrounds.
|
2018-12-06 01:17:01 +08:00
|
|
|
}
|
|
|
|
|
2019-03-09 21:04:59 +08:00
|
|
|
// Styles defines the theme for applications. The default is for a black
|
|
|
|
// background and some basic colors: black, white, yellow, green, cyan, and
|
|
|
|
// blue.
|
2018-12-06 01:17:01 +08:00
|
|
|
var Styles = Theme{
|
2018-01-10 16:43:32 +08:00
|
|
|
PrimitiveBackgroundColor: tcell.ColorBlack,
|
|
|
|
ContrastBackgroundColor: tcell.ColorBlue,
|
|
|
|
MoreContrastBackgroundColor: tcell.ColorGreen,
|
|
|
|
BorderColor: tcell.ColorWhite,
|
|
|
|
TitleColor: tcell.ColorWhite,
|
|
|
|
GraphicsColor: tcell.ColorWhite,
|
|
|
|
PrimaryTextColor: tcell.ColorWhite,
|
|
|
|
SecondaryTextColor: tcell.ColorYellow,
|
|
|
|
TertiaryTextColor: tcell.ColorGreen,
|
|
|
|
InverseTextColor: tcell.ColorBlue,
|
2023-08-27 00:31:47 +08:00
|
|
|
ContrastSecondaryTextColor: tcell.ColorNavy,
|
2018-01-10 16:43:32 +08:00
|
|
|
}
|