How can I change whole site color with toggle a button

@danmaxwix you used commas instead of semicolons (+ other things).
It should be something like:

$w.onReady(function () {
    $w('#darkModeSwitch').onChange(function () {
        if ($w('#darkModeSwitch').checked) { 
            $w('Document').background.src = 'https://dummyimage.com/1/333333';
            $w('#darkModeState').text = 'Dark Mode On';
            $w('#emailIcon').src = 'https://static.wixstatic.com/media/d04120_2cd897ba7a2246a396bfa8a23dad40ef~mv2.png';
        } else { 
            $w('Document').background.src = "https://static.wixstatic.com/media/d04120_2636c2ad09774cd597ccfb1e9f929e25~mv2.png";
            $w('#darkModeState').text = 'Dark Mode Off';
            $w('#emailIcon').src = 'https://static.wixstatic.com/media/d04120_a2f9e9ccd89744d5af2cd1e4bb652e6b~mv2.jpg';
          }
    });
});