Skip to content

Commit bf41195

Browse files
great tables
1 parent a240314 commit bf41195

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

quarto/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
from quarto.metadata import metadata
99
from quarto.theme import plotly_theme_colors, plotly_theme_brand, \
1010
altair_theme_colors, altair_theme_brand, \
11-
bokeh_theme_colors, bokeh_theme_brand
11+
bokeh_theme_colors, bokeh_theme_brand, \
12+
great_tables_theme_colors, great_tables_theme_brand

quarto/theme.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def plotly_theme_brand(brand_yml):
1313
brand = yaml.safe_load(open(brand_yml).read())
1414
return plotly_theme_colors(brand["color"]["background"], brand["color"]["foreground"])
1515

16+
1617
def altair_theme_colors(bg, fg):
1718
return {
1819
'config': {
@@ -36,6 +37,7 @@ def altair_theme_brand(brand_yml):
3637
fg = brand["color"]["foreground"]
3738
return partial(altair_theme_colors, bg, fg)
3839

40+
# background fill is incomplete
3941
def bokeh_theme_colors(bg, fg):
4042
from bokeh.io import curdoc
4143
from bokeh.themes import Theme
@@ -59,3 +61,15 @@ def bokeh_theme_brand(brand_yml):
5961
fg = brand["color"]["foreground"]
6062
bg = brand["color"]["background"]
6163
return partial(bokeh_theme_colors, bg, fg)
64+
65+
66+
def great_tables_theme_colors(bg, fg):
67+
return {
68+
'table_background_color': bg,
69+
'table_font_color': fg
70+
}
71+
def great_tables_theme_brand(brand_yml):
72+
brand = yaml.safe_load(open(brand_yml).read())
73+
fg = brand["color"]["foreground"]
74+
bg = brand["color"]["background"]
75+
return great_tables_theme_colors(bg, fg)

0 commit comments

Comments
 (0)