```{r}
#| renderings: [light, dark]
plot(1:10) # Shown in `light` mode
par(bg = "#000000", fg = "#FFFFFF", col.axis = "#FFFFFF")
plot(1:10) # Shown in `dark` mode
```
Quarto 1.7 is out! You can get the current release from the download page.
We are especially enthusiastic about the improvements 1.7 brings to dark mode: you can now specify light and dark themes via brand, map computational outputs to themes, and have your website theme follow your viewer’s preference. To celebrate these changes, this site, quarto.org, now has a light and dark mode. Toggle the switch in the navigation bar () to see the difference.
You can read about these improvements and some other highlights below. You can find all the changes in this version in the Release Notes.
Dark Mode Improvements
Specify light and dark themes via brand.yml
You can now specify a light and dark brand. For example, at a project-level you can provide two brand files:
_quarto.yml
brand:
light: light-brand.yml
dark: dark-brand.yml
Standalone HTML pages, websites, and dashboards will gain a light switch toggle allowing viewers to switch between the light and dark themes.
light
branddark
brandBy default Typst documents will use the light brand, but you can set the brand-mode
option to use the dark brand instead:
document.qmd
---
format:
typst:
brand-mode: dark
---
Read about other ways to set a light and dark brand in Guide > Brand.
Map computational outputs to themes
A new code cell option, renderings
, allows you to indicate which computational outputs should be displayed in light and dark mode. Create light and dark versions of your outputs in a single code cell, and add the option renderings
to specify the order of the outputs. For example, this cell creates a light
version of a plot, then a dark
version:
Both outputs are produced, but you’ll only see the one corresponding to the current state of the light switch. Toggle the switch in the navigation bar to see the image change to reflect the theme.
Respect user color scheme
Set the new html
format option respect-user-color-scheme
to true
if you would like your site to honor the viewer’s operating system or browser preference for light or dark mode:
_quarto.yml
format:
html:
respect-user-color-scheme: true
Other Highlights
Typst updated to 0.13.0
Pandoc updated to 3.6.3
New
version
shortcode to insert the version of Quarto used to build your document:Rendered with Quarto {{< version >}}
Rendered with Quarto 1.7.29
Improvements to the
julia
engine:juliaup
integration: Use specific versions of Julia in your notebooks.R and Python support: Include
{r}
and{python}
executable code cells via the RCall and PythonCall packages.Caching: Save time rendering long-running notebooks by caching results.
Revise.jl integration: Automatically update function definitions in Julia sessions.
Acknowledgements
We’d like to say a huge thank you to everyone who contributed to this release by opening issues and pull requests:
AndreasThinks, ArthurData, BrendonChau, DanStuder, DavidFirth, Eli-78-fas, EllaKaye, EmilHvitfeldt, EvoArt, FMKerckhof, FrankwaP, JanPalasek, Jocarnail, MHellmund, MichaelHatherly, Noghpu, PeneLoopy, Rafnuss, SergeCroise, TonyFly3000, actuaristai, alex-r-bigelow, andrewheiss, ant-durrant, antoine4ucsd, arnaudgallou, aronatkins, arthurgailes, bkowshik, boshek, cbrnr, cl-roberts, cmadland, coatless, deepayan, devmcp, dhimmel, dkapitan, dmenne, eamcvey, edavidaja, fredguth, fuhrmanator, gadenbuie, github-actions[bot], glin, gwbrck, hchulkim, hguturu, hturner, ihrke, jdutant, jenslaufer, jkrumbiegel, jmgirard, joelostblom, kandolfp, kapsner, kazuyanagimoto, kdheepak, kingo55, knuesel, kubu4, kv9898, kylie-foster, loneguardian, lwjohnst86, ma2048, markjholmes, maurosilber, mipmip, mroavi, mroberts1, msh855, mvuorre, nathanj3, odysseu, parmsam, peter-gy, pvelayudhan, raffaem, robmcd, ryanzomorrodi, stragu, sun123zxy, t-kalinowski, temospena, tjni, torven-schalk, turcotte, wenyaoliu, yhkee0404.