Added color to palette.
Added comments to palette.
This commit is contained in:
parent
c83a6d5aad
commit
f31cd28771
34
ui/style.go
34
ui/style.go
@ -17,13 +17,22 @@ type Fonts struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Palette struct {
|
type Palette struct {
|
||||||
Background color.Color
|
// Background is the default background color.
|
||||||
Primary color.Color
|
Background color.Color
|
||||||
|
// Primary is used as a the main contrast color.
|
||||||
|
Primary color.Color
|
||||||
|
// PrimaryHighlight is a highlighted version of the main contrast color.
|
||||||
PrimaryHighlight color.Color
|
PrimaryHighlight color.Color
|
||||||
|
// PrimaryBackground is a background version of the main contrast color.
|
||||||
|
PrimaryBackground color.Color
|
||||||
|
// ShadedBackground is a darker version of the background color.
|
||||||
ShadedBackground color.Color
|
ShadedBackground color.Color
|
||||||
Text color.Color
|
// Text is the default text color.
|
||||||
TextDisabled color.Color
|
Text color.Color
|
||||||
TextOnPrimary color.Color
|
// TextDisabled is disabled text color.
|
||||||
|
TextDisabled color.Color
|
||||||
|
// TextOnPrimary is the text color when used with the main contrast color as background.
|
||||||
|
TextOnPrimary color.Color
|
||||||
}
|
}
|
||||||
|
|
||||||
type Style struct {
|
type Style struct {
|
||||||
@ -54,13 +63,14 @@ func DefaultFonts() *Fonts {
|
|||||||
func DefaultPalette() *Palette {
|
func DefaultPalette() *Palette {
|
||||||
if defaultPalette == nil {
|
if defaultPalette == nil {
|
||||||
defaultPalette = &Palette{
|
defaultPalette = &Palette{
|
||||||
Background: color.White,
|
Background: color.White,
|
||||||
Primary: RGBA(0x3F, 0x51, 0xB5, 0xFF),
|
Primary: RGBA(0x3F, 0x51, 0xB5, 0xFF),
|
||||||
PrimaryHighlight: RGBA(0x5C, 0x6B, 0xC0, 0xFF),
|
PrimaryHighlight: RGBA(0x5C, 0x6B, 0xC0, 0xFF),
|
||||||
ShadedBackground: RGBA(0xFA, 0xFA, 0xFA, 0xFF),
|
PrimaryBackground: RGBA(0x9F, 0xA8, 0xDA, 0xFF),
|
||||||
Text: color.Black,
|
ShadedBackground: RGBA(0xFA, 0xFA, 0xFA, 0xFF),
|
||||||
TextDisabled: RGBA(0xBD, 0xBD, 0xBD, 0xFF),
|
Text: color.Black,
|
||||||
TextOnPrimary: color.White,
|
TextDisabled: RGBA(0xBD, 0xBD, 0xBD, 0xFF),
|
||||||
|
TextOnPrimary: color.White,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return defaultPalette
|
return defaultPalette
|
||||||
|
Loading…
Reference in New Issue
Block a user