2018-01-10 08:43:32 +00:00
|
|
|
package tview
|
|
|
|
|
2020-10-18 12:15:57 +00:00
|
|
|
import "github.com/gdamore/tcell/v2"
|
2018-01-10 08:43:32 +00:00
|
|
|
|
2019-03-09 13:04:59 +00:00
|
|
|
// Theme defines the colors used when primitives are initialized.
|
2018-12-05 17:17:01 +00:00
|
|
|
type Theme struct {
|
2018-01-10 08:43:32 +00: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-15 16:14:14 +00:00
|
|
|
ContrastSecondaryTextColor tcell.Color // Secondary text on ContrastBackgroundColor-colored backgrounds.
|
2018-12-05 17:17:01 +00:00
|
|
|
}
|
|
|
|
|
2019-03-09 13:04:59 +00: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-05 17:17:01 +00:00
|
|
|
var Styles = Theme{
|
2018-01-10 08:43:32 +00: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,
|
2021-11-08 15:35:21 +00:00
|
|
|
ContrastSecondaryTextColor: tcell.ColorDarkBlue,
|
2018-01-10 08:43:32 +00:00
|
|
|
}
|