How to dynamically change the color of plots upon changing theme in a quatro html document? #12668
-
DescriptionHi, I hope you are doing well! I was wondering if it was possible that your plot colors change dynamically when you toggle the theme switcher in a Quatro html document. Here is a simple example showing that when you plot a figure with Plotly and you change to darkly theme, the figure doesn't change colors : I looked up for ways to make this work (plotly-like or static plot), but given that I am relatively new to coding my efforts have not been successful for now. I saw this post that looked promising but I have not been able to make it work with quarto : https://hellodash.pythonanywhere.com/adding-themes/color-modes. Thus, If somebody could help me a bit, I would really appreciate it! Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @JacobHamelMottiez, yes this is a brand-new feature in 1.7, released this week. You can read about the https://quarto.org/docs/computations/execution-options.html#cell-renderings There will be helper functions for Python and R, via the Until then, you can look at these examples: https://github.com/gordonwoodhull/quarto-light-dark-experiments/tree/main/dark-brand |
Beta Was this translation helpful? Give feedback.
Hi @JacobHamelMottiez, yes this is a brand-new feature in 1.7, released this week.
You can read about the
renderings
feature here:https://quarto.org/docs/computations/execution-options.html#cell-renderings
There will be helper functions for Python and R, via the
quarto-python
andquarto-r
packages, available soon.Until then, you can look at these examples:
https://github.com/gordonwoodhull/quarto-light-dark-experiments/tree/main/dark-brand