A practical guide to syncing CSS custom property theme colors (light/dark mode) with HTML canvas rendering. The technique uses `window.getComputedStyle()` to read CSS custom properties into a JavaScript theme object, then attaches a `MediaQueryList` event listener to `prefers-color-scheme` so canvas colors automatically update whenever the user switches themes.
3 Impressions