feat: add theme of ant design
This commit is contained in:
parent
28bb9c57bc
commit
6209a9ce63
1 changed files with 35 additions and 0 deletions
35
theme.go
35
theme.go
|
|
@ -29,6 +29,7 @@ import (
|
||||||
const ThemeDark = "dark"
|
const ThemeDark = "dark"
|
||||||
const ThemeLight = "light"
|
const ThemeLight = "light"
|
||||||
const ThemeGrafana = "grafana"
|
const ThemeGrafana = "grafana"
|
||||||
|
const ThemeAnt = "ant"
|
||||||
|
|
||||||
type Theme struct {
|
type Theme struct {
|
||||||
palette *themeColorPalette
|
palette *themeColorPalette
|
||||||
|
|
@ -67,6 +68,16 @@ func init() {
|
||||||
parseColor("#705DA0"),
|
parseColor("#705DA0"),
|
||||||
parseColor("#508642"),
|
parseColor("#508642"),
|
||||||
}
|
}
|
||||||
|
antSeriesColors := []drawing.Color{
|
||||||
|
parseColor("#5b8ff9"),
|
||||||
|
parseColor("#5ad8a6"),
|
||||||
|
parseColor("#5d7092"),
|
||||||
|
parseColor("#f6bd16"),
|
||||||
|
parseColor("#6f5ef9"),
|
||||||
|
parseColor("#6dc8ec"),
|
||||||
|
parseColor("#945fb9"),
|
||||||
|
parseColor("#ff9845"),
|
||||||
|
}
|
||||||
AddTheme(
|
AddTheme(
|
||||||
ThemeDark,
|
ThemeDark,
|
||||||
true,
|
true,
|
||||||
|
|
@ -121,6 +132,30 @@ func init() {
|
||||||
},
|
},
|
||||||
echartSeriesColors,
|
echartSeriesColors,
|
||||||
)
|
)
|
||||||
|
AddTheme(
|
||||||
|
ThemeAnt,
|
||||||
|
false,
|
||||||
|
drawing.Color{
|
||||||
|
R: 110,
|
||||||
|
G: 112,
|
||||||
|
B: 121,
|
||||||
|
A: 255,
|
||||||
|
},
|
||||||
|
drawing.Color{
|
||||||
|
R: 224,
|
||||||
|
G: 230,
|
||||||
|
B: 242,
|
||||||
|
A: 255,
|
||||||
|
},
|
||||||
|
drawing.ColorWhite,
|
||||||
|
drawing.Color{
|
||||||
|
R: 70,
|
||||||
|
G: 70,
|
||||||
|
B: 70,
|
||||||
|
A: 255,
|
||||||
|
},
|
||||||
|
antSeriesColors,
|
||||||
|
)
|
||||||
AddTheme(
|
AddTheme(
|
||||||
ThemeGrafana,
|
ThemeGrafana,
|
||||||
true,
|
true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue