Added more colors
This commit is contained in:
parent
bd636eaa7f
commit
e9dff8ad07
@ -239,15 +239,30 @@ func (Default) Pattern (id tomo.Pattern, state tomo.State, c tomo.Case) artist.P
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (Default) Color (id tomo.Color, state tomo.State, c tomo.Case) color.RGBA {
|
func (Default) Color (id tomo.Color, state tomo.State, c tomo.Case) color.RGBA {
|
||||||
if state.Disabled {
|
if state.Disabled { return artist.Hex(0x444444FF) }
|
||||||
return artist.Hex(0x444444FF)
|
|
||||||
} else {
|
return artist.Hex (map[tomo.Color] uint32 {
|
||||||
switch id {
|
tomo.ColorBlack: 0x000000FF,
|
||||||
case tomo.ColorAccent: return artist.Hex(0x408090FF)
|
tomo.ColorRed: 0x880000FF,
|
||||||
case tomo.ColorForeground: return artist.Hex(0x000000FF)
|
tomo.ColorGreen: 0x008800FF,
|
||||||
default: return artist.Hex(0x888888FF)
|
tomo.ColorYellow: 0x888800FF,
|
||||||
}
|
tomo.ColorBlue: 0x000088FF,
|
||||||
}
|
tomo.ColorPurple: 0x880088FF,
|
||||||
|
tomo.ColorCyan: 0x008888FF,
|
||||||
|
tomo.ColorWhite: 0x888888FF,
|
||||||
|
tomo.ColorBrightBlack: 0x888888FF,
|
||||||
|
tomo.ColorBrightRed: 0xFF0000FF,
|
||||||
|
tomo.ColorBrightGreen: 0x00FF00FF,
|
||||||
|
tomo.ColorBrightYellow: 0xFFFF00FF,
|
||||||
|
tomo.ColorBrightBlue: 0x0000FFFF,
|
||||||
|
tomo.ColorBrightPurple: 0xFF00FFFF,
|
||||||
|
tomo.ColorBrightCyan: 0x00FFFFFF,
|
||||||
|
tomo.ColorBrightWhite: 0xFFFFFFFF,
|
||||||
|
|
||||||
|
tomo.ColorForeground: 0x000000FF,
|
||||||
|
tomo.ColorBackground: 0xAAAAAAFF,
|
||||||
|
tomo.ColorAccent: 0x408090FF,
|
||||||
|
} [id])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Padding returns the default padding value for the given pattern.
|
// Padding returns the default padding value for the given pattern.
|
||||||
|
25
theme.go
25
theme.go
@ -55,11 +55,32 @@ type Pattern int; const (
|
|||||||
|
|
||||||
// Color lits a number of cannonical colors, each with its own ID.
|
// Color lits a number of cannonical colors, each with its own ID.
|
||||||
type Color int; const (
|
type Color int; const (
|
||||||
// ColorAccent is the accent color of the theme.
|
// The sixteen ANSI terminal colors:
|
||||||
ColorAccent Color = iota
|
ColorBlack Color = iota
|
||||||
|
ColorRed
|
||||||
|
ColorGreen
|
||||||
|
ColorYellow
|
||||||
|
ColorBlue
|
||||||
|
ColorPurple
|
||||||
|
ColorCyan
|
||||||
|
ColorWhite
|
||||||
|
ColorBrightBlack
|
||||||
|
ColorBrightRed
|
||||||
|
ColorBrightGreen
|
||||||
|
ColorBrightYellow
|
||||||
|
ColorBrightBlue
|
||||||
|
ColorBrightPurple
|
||||||
|
ColorBrightCyan
|
||||||
|
ColorBrightWhite
|
||||||
|
|
||||||
// ColorForeground is the text/icon color of the theme.
|
// ColorForeground is the text/icon color of the theme.
|
||||||
ColorForeground
|
ColorForeground
|
||||||
|
|
||||||
|
// ColorBackground is the background color of the theme.
|
||||||
|
ColorBackground
|
||||||
|
|
||||||
|
// ColorAccent is the accent color of the theme.
|
||||||
|
ColorAccent
|
||||||
)
|
)
|
||||||
|
|
||||||
// Icon lists a number of cannonical icons, each with its own ID.
|
// Icon lists a number of cannonical icons, each with its own ID.
|
||||||
|
Reference in New Issue
Block a user