(request: WSGIRequest)
Updates the static color used for some programs.
Updates the static color used for some programs.
Updates the static color used for some programs .
def set_fixed_color(request: WSGIRequest) -> None:
    """Updates the static color used for some programs."""
    hex_col = request.POST.get("value").lstrip("#")  # type: ignore
    # raises IndexError on wrong input, caught in option decorator
    color = tuple(int(hex_col[i : i + 2], 16) / 255 for i in (0, 2, 4))
    # https://github.com/python/mypy/issues/5068
    color = cast(Tuple[float, float, float], color)
    storage.set("fixed_color", str(color))
    _notify_settings_changed("base")
def set_fixed_color ( request : WSGIRequest ) -> None : hex_col = request . POST . get ( "value" ) . lstrip ( "#" ) # type: ignore # raises IndexError on wrong input, caught in option decorator color = tuple ( int ( hex_col [ i : i + 2 ] , 16 ) / 255 for i in ( 0 , 2 , 4 ) ) # https://github.com/python/mypy/issues/5068 color = cast ( Tuple [ float , float , float ] , color ) storage . set ( "fixed_color" , str ( color ) ) _notify_settings_changed ( "base" )