def srgb_to_linear(srgb):
    """
    Converts sRGB float value to a linear float value
    :type srgb: float
    :param srgb: the sRGB value to convert
    :rtype: float
    :return: the calculated linear value
    """
    srgb = float(srgb)
    if srgb <= 0.04045:
        linear = srgb / 12.92
    else:
        linear = pow((srgb + 0.055) / 1.055, 2.4)
    return linear