Cara Mendapatkan Nilai Tema OS di JavaScript
function osTheme(){
let primarytheme = "";
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
primarytheme = "dark";
}
else{
primarytheme = "light"
}
return primarytheme;
}
Aryamitra Chaudhuri