def linear_to_srgb(linear):
    """
    Converts linear float value to a sRGB float value
    :type linear: float
    :param linear: the linear value to convert
    :rtype: float
    :return: the calculated sRGB value
    """
    linear = float(linear)
    if linear <= 0.0031308:
        srgb = linear * 12.92
    else:
        srgb = 1.055 * pow(linear, 1. / 2.4) - 0.055
    return srgb