how to detect which color-scheme is being used in javascript code example
Example: javascript detect dark mode
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;