We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a75ca65 commit dbc8724Copy full SHA for dbc8724
quarto/__init__.py
@@ -12,4 +12,5 @@
12
matplotlib_theme_colors, matplotlib_theme_brand, \
13
plotnine_theme_colors, plotnine_theme_brand, \
14
plotly_theme_colors, plotly_theme_brand, \
15
+ pygal_theme_colors, pygal_theme_brand, \
16
seaborn_theme_colors, seaborn_theme_brand
quarto/theme.py
@@ -113,6 +113,29 @@ def plotly_theme_brand(brand_yml):
113
return plotly_theme_colors(brand["color"]["background"], brand["color"]["foreground"])
114
115
116
+def pygal_theme_colors(_bg, fg, primary, secondary):
117
+ from pygal.style import Style
118
+ return Style(
119
+ background='transparent',
120
+ plot_background='transparent',
121
+ foreground=fg,
122
+ foreground_strong=primary,
123
+ foreground_subtle=secondary or '#630C0D',
124
+ opacity='.6',
125
+ opacity_hover='.9',
126
+ transition='400ms ease-in',
127
+ colors=('#E853A0', '#E8537A', '#E95355', '#E87653', '#E89B53'))
128
+
129
+def pygal_theme_brand(brand_yml):
130
+ brand = yaml.safe_load(open(brand_yml).read())
131
+ return pygal_theme_colors(
132
+ brand["color"]["background"],
133
+ brand["color"]["foreground"],
134
+ brand["color"]["primary"],
135
+ brand["color"].get("secondary"),
136
+ )
137
138
139
def seaborn_theme_colors(bg, fg):
140
# seaborn accepts matplotlib rcparams
141
return {
0 commit comments