styles.go 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package tview
  2. import "github.com/gdamore/tcell/v2"
  3. // Theme defines the colors used when primitives are initialized.
  4. type Theme struct {
  5. PrimitiveBackgroundColor tcell.Color // Main background color for primitives.
  6. ContrastBackgroundColor tcell.Color // Background color for contrasting elements.
  7. MoreContrastBackgroundColor tcell.Color // Background color for even more contrasting elements.
  8. BorderColor tcell.Color // Box borders.
  9. TitleColor tcell.Color // Box titles.
  10. GraphicsColor tcell.Color // Graphics.
  11. PrimaryTextColor tcell.Color // Primary text.
  12. SecondaryTextColor tcell.Color // Secondary text (e.g. labels).
  13. TertiaryTextColor tcell.Color // Tertiary text (e.g. subtitles, notes).
  14. InverseTextColor tcell.Color // Text on primary-colored backgrounds.
  15. ContrastSecondaryTextColor tcell.Color // Secondary text on ContrastBackgroundColor-colored backgrounds.
  16. }
  17. // Styles defines the theme for applications. The default is for a black
  18. // background and some basic colors: black, white, yellow, green, cyan, and
  19. // blue.
  20. var Styles = Theme{
  21. PrimitiveBackgroundColor: tcell.ColorBlack,
  22. ContrastBackgroundColor: tcell.ColorBlue,
  23. MoreContrastBackgroundColor: tcell.ColorGreen,
  24. BorderColor: tcell.ColorWhite,
  25. TitleColor: tcell.ColorWhite,
  26. GraphicsColor: tcell.ColorWhite,
  27. PrimaryTextColor: tcell.ColorWhite,
  28. SecondaryTextColor: tcell.ColorYellow,
  29. TertiaryTextColor: tcell.ColorGreen,
  30. InverseTextColor: tcell.ColorBlue,
  31. ContrastSecondaryTextColor: tcell.ColorDarkBlue,
  32. }