Skip to content

Conversation

@gordonwoodhull
Copy link
Collaborator

@gordonwoodhull gordonwoodhull commented Apr 28, 2025

Here are helper functions for about eight Python plotting and table packages.

Companion to quarto-dev/quarto-r#234 for R packages

The corresponding adapted examples are on the quarto-helpers branch, helpers/ directory of my quarto-light-dark-experiments repo:

https://github.com/gordonwoodhull/quarto-light-dark-experiments/tree/use-quarto-helpers/helpers

naming convention

Following the naming convention from quarto-r, I have adopted

Name Params Purpose
theme_colors_{package} bg, fg A function that will return an appropriate object or function that applies the theme to that package.
theme_brand_{package} brand_yml A function that takes a brand.yml path and returns the same kind of appropriate object or function.

A couple of these functions that also take a primary and/or secondary color. That's not something we're trying to support, but a pointer of where advanced users could take this.

Conventions are all over the board as to what is appropriate to return and how it will be used. (Theming is the most idiomatic thing you can do with any package. 😉 )

We need to find a home for the examples quarto-light-dark-experiments. Maybe in quarto-examples? But this would add a lot of dependencies.

As always, I'm open to all design suggestions. Note that these aren't really Quarto functions; they are adaptors to help use other packages with Quarto.

@gordonwoodhull
Copy link
Collaborator Author

This PR also changes the license to MIT, because we want people to feel very free to copy these helpers and improve them for their own purposes.

@gordonwoodhull gordonwoodhull marked this pull request as ready for review May 5, 2025 21:18
@gordonwoodhull gordonwoodhull force-pushed the feature/theme-helpers branch from 17f86e2 to 3c7cbe9 Compare May 5, 2025 21:22
@gordonwoodhull gordonwoodhull merged commit d6eb0c3 into quarto-dev:main May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant