Themes are represented by CSS classes that set variables that are then used by the rest of the CSS. If a particular theme is selected, the CSS class name corresponding to it is put in local storage. Otherwise, the user's color scheme preference is used.