[Framework examples →](../)

# Vega-Lite responsive dark mode

View live: <https://observablehq.observablehq.cloud/framework-example-vega-dark/>

This Observable Framework example demonstrates how to implement responsive dark mode in Vega-Lite using Framework’s `dark` built-in, which reflects the user’s [preferred color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme). The chart automatically switches between light and dark mode if the user’s preferred color scheme changes.
