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 4fcf29d commit a2a6554Copy full SHA for a2a6554
quarto/__init__.py
@@ -6,3 +6,4 @@
6
from quarto.quarto import path
7
from quarto.render import render
8
from quarto.metadata import metadata
9
+from quarto.theme import plotly_theme_colors, plotly_theme_brand
quarto/theme.py
@@ -0,0 +1,14 @@
1
+import yaml
2
+import plotly.graph_objects as go
3
+from functools import partial
4
+
5
+def plotly_theme_colors(bg, fg):
+ return go.layout.Template({'layout': {
+ 'paper_bgcolor': bg,
+ 'plot_bgcolor': bg,
+ 'font_color': fg,
10
+ }})
11
12
+def plotly_theme_brand(brand_yml):
13
+ brand = yaml.safe_load(open(brand_yml).read())
14
+ return plotly_theme_colors(brand["color"]["background"], brand["color"]["foreground"])
0 commit comments