def set_color_mode(
    new_color_mode: LiteralColorMode | Var[LiteralColorMode],
) -> EventSpec:
    """Create an EventSpec Var that sets the color mode to a specific value.

    Note: `set_color_mode` is not a real event and cannot be triggered from a
    backend event handler.

    Args:
        new_color_mode: The color mode to set.

    Returns:
        The EventSpec Var that can be passed to an event trigger.
    """
    base_setter = _color_mode_var(
        _js_expr=constants.ColorMode.SET,
    ).to(FunctionVar)

    return run_script(
        base_setter.call(new_color_mode),
    )
Create an EventSpec Var that sets the color mode to a specific value.

    Note: `set_color_mode` is not a real event and cannot be triggered from a
    backend event handler.

    Args:
        new_color_mode: The color mode to set.

    Returns:
        The EventSpec Var that can be passed to an event trigger.
    
reflex/style.py