It appears to use JavaScript to set a data attribute on the <html> element, and then the CSS has selectors to match that data attribute and set some color variables. There's also a transition CSS property on the elements that change color to achieve the fade effect.
Pretty simple solution and looks great.