Dark mode is a success! I learned a lot more about state, context, and ternary operations with this one. Using MUIs theming I set the mode of the theme to the value of mode which is the value of context. A ternary in the theme will check whether it's true and deliver dark or light. Context is first set to the user preference along with the switch position. It can then be toggled at will by using the switch.