Added secondary colors to palette.
This commit is contained in:
parent
3a18d3adf9
commit
4e37f4b23e
@ -4,8 +4,8 @@ import (
|
|||||||
"image/color"
|
"image/color"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
_ "opslag.de/schobers/zntg/sdlui" // import the renderer for the UI
|
// _ "opslag.de/schobers/zntg/sdlui" // import the renderer for the UI
|
||||||
// _ "opslag.de/schobers/zntg/allg5ui" // import the renderer for the UI
|
_ "opslag.de/schobers/zntg/allg5ui" // import the renderer for the UI
|
||||||
|
|
||||||
"opslag.de/schobers/geom"
|
"opslag.de/schobers/geom"
|
||||||
"opslag.de/schobers/zntg/ui"
|
"opslag.de/schobers/zntg/ui"
|
||||||
|
35
ui/style.go
35
ui/style.go
@ -33,6 +33,14 @@ type Palette struct {
|
|||||||
PrimaryHighlight color.Color
|
PrimaryHighlight color.Color
|
||||||
// PrimaryLight is a background version of the main contrast color.
|
// PrimaryLight is a background version of the main contrast color.
|
||||||
PrimaryLight color.Color
|
PrimaryLight color.Color
|
||||||
|
// Secondary is used as a the secondary contrast color.
|
||||||
|
Secondary color.Color
|
||||||
|
// SecondaryDark is a foreground version of the secondary contrast color.
|
||||||
|
SecondaryDark color.Color
|
||||||
|
// SecondaryHighlight is a light version of the secondary contrast color.
|
||||||
|
SecondaryHighlight color.Color
|
||||||
|
// SecondaryLight is a background version of the secondary contrast color.
|
||||||
|
SecondaryLight color.Color
|
||||||
// ShadedBackground is a darker version of the background color.
|
// ShadedBackground is a darker version of the background color.
|
||||||
ShadedBackground color.Color
|
ShadedBackground color.Color
|
||||||
// Text is the default text color.
|
// Text is the default text color.
|
||||||
@ -43,6 +51,8 @@ type Palette struct {
|
|||||||
TextNegative color.Color
|
TextNegative color.Color
|
||||||
// TextOnPrimary is the text color when used with the main contrast color as background.
|
// TextOnPrimary is the text color when used with the main contrast color as background.
|
||||||
TextOnPrimary color.Color
|
TextOnPrimary color.Color
|
||||||
|
// TextOnSecondary is the text color when used with the secondary contrast color as background.
|
||||||
|
TextOnSecondary color.Color
|
||||||
// TextPositive is the text color associated with a positive event.
|
// TextPositive is the text color associated with a positive event.
|
||||||
TextPositive color.Color
|
TextPositive color.Color
|
||||||
}
|
}
|
||||||
@ -70,17 +80,26 @@ func DefaultFontNames() *FontNames {
|
|||||||
|
|
||||||
func DefaultPalette() *Palette {
|
func DefaultPalette() *Palette {
|
||||||
return &Palette{
|
return &Palette{
|
||||||
Background: color.White,
|
Background: color.White,
|
||||||
|
|
||||||
Primary: zntg.MustHexColor(`#3F51B5`),
|
Primary: zntg.MustHexColor(`#3F51B5`),
|
||||||
PrimaryDark: zntg.MustHexColor(`#002884`),
|
PrimaryDark: zntg.MustHexColor(`#132584`),
|
||||||
PrimaryHighlight: zntg.MustHexColor(`#E8EAF6`),
|
PrimaryHighlight: zntg.MustHexColor(`#E8EAF6`),
|
||||||
PrimaryLight: zntg.MustHexColor(`#757CE8`),
|
PrimaryLight: zntg.MustHexColor(`#5E6EC7`),
|
||||||
|
|
||||||
|
Secondary: zntg.MustHexColor(`#FFA441`),
|
||||||
|
SecondaryDark: zntg.MustHexColor(`#C06605`),
|
||||||
|
SecondaryHighlight: zntg.MustHexColor(`#FFEFDD`),
|
||||||
|
SecondaryLight: zntg.MustHexColor(`#FFB564`),
|
||||||
|
|
||||||
ShadedBackground: zntg.MustHexColor(`#FAFAFA`),
|
ShadedBackground: zntg.MustHexColor(`#FAFAFA`),
|
||||||
Text: color.Black,
|
|
||||||
TextDisabled: zntg.MustHexColor(`#BDBDBD`),
|
Text: color.Black,
|
||||||
TextNegative: zntg.MustHexColor(`#FF4336`),
|
TextDisabled: zntg.MustHexColor(`#BDBDBD`),
|
||||||
TextOnPrimary: color.White,
|
TextNegative: zntg.MustHexColor(`#FF4336`),
|
||||||
TextPositive: zntg.MustHexColor(`#4CAF50`),
|
TextOnPrimary: color.White,
|
||||||
|
TextOnSecondary: color.Black,
|
||||||
|
TextPositive: zntg.MustHexColor(`#4CAF50`),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user