Added Highlight color to Palette.

This commit is contained in:
Sander Schobers 2018-09-09 18:49:18 +02:00
parent c2009c5a8b
commit eb0b660ab6

View File

@ -8,6 +8,7 @@ import (
type Palette interface {
Primary() allegro5.Color
PrimaryHighlight() allegro5.Color
PrimaryTransparent() allegro5.Color
Lightest() allegro5.Color
Darker() allegro5.Color
@ -17,6 +18,7 @@ type Palette interface {
type palette struct {
primary allegro5.Color
primaryH allegro5.Color
primaryT allegro5.Color
lightest allegro5.Color
darker allegro5.Color
@ -28,6 +30,10 @@ func (p *palette) Primary() allegro5.Color {
return p.primary
}
func (p *palette) PrimaryHighlight() allegro5.Color {
return p.primaryH
}
func (p *palette) PrimaryTransparent() allegro5.Color {
return p.primaryT
}
@ -60,6 +66,7 @@ func DefaultPalette() Palette {
var primary = Blue500
return &palette{
primary: NewColor(primary),
primaryH: NewColor(Blue400),
primaryT: NewColorAlpha(primary, 96),
lightest: allegro5.NewColor(0xff, 0xff, 0xff),
darker: allegro5.NewColorAlpha(0, 0, 0, 188),