2019-02-02 04:39:34 +00:00
|
|
|
package console
|
2019-01-31 23:40:05 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
ui "github.com/sqshq/termui"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Theme string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ThemeDark Theme = "dark"
|
|
|
|
ThemeLight Theme = "light"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
ColorOlive ui.Color = 178
|
|
|
|
ColorDeepSkyBlue ui.Color = 39
|
|
|
|
ColorDeepPink ui.Color = 162
|
|
|
|
ColorDarkGrey ui.Color = 240
|
|
|
|
)
|
|
|
|
|
|
|
|
type Palette struct {
|
|
|
|
Colors []ui.Color
|
2019-02-05 03:26:00 +00:00
|
|
|
// TODO Menu colors, like Dark, Medium, Light etc
|
2019-01-31 23:40:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func GetPalette(theme Theme) Palette {
|
|
|
|
switch theme {
|
|
|
|
case ThemeDark:
|
2019-02-05 03:26:00 +00:00
|
|
|
return Palette{Colors: []ui.Color{ColorOlive, ColorDeepSkyBlue, ColorDeepPink, ColorOlive, ColorDeepSkyBlue, ColorDeepPink}}
|
2019-01-31 23:40:05 +00:00
|
|
|
case ThemeLight:
|
2019-02-05 03:26:00 +00:00
|
|
|
return Palette{Colors: []ui.Color{ColorOlive, ColorDeepSkyBlue, ColorDeepPink, ColorOlive, ColorDeepSkyBlue, ColorDeepPink}}
|
2019-01-31 23:40:05 +00:00
|
|
|
default:
|
|
|
|
panic(fmt.Sprintf("Following theme is not supported: %v", theme))
|
|
|
|
}
|
|
|
|
}
|