def to_hsl(color: tuple) -> tuple:
    """Transforms a color from rgb space to hsl space.

    Color must be given as a 3D tuple representing a point in rgb space.
    Returns a 3D tuple representing a point in the hsl space.

    Saturation and luminance are given as floats representing percentages
    with a precision of 2. Hue is given as an angle in degrees between
    0 and 360 degrees with a precision of 0.
    """

    rf = color[0] / 255
    gf = color[1] / 255
    bf = color[2] / 255
    maximum = max(rf, gf, bf)
    minimum = min(rf, gf, bf)

    delta = maximum - minimum
    l = (maximum + minimum) / 2
    s = 0 if delta == 0 else delta / (1 - abs(2 * l - 1))

    if delta == 0:
        h = 0
    elif maximum == rf:
        h = 60 * (((gf - bf) / delta) % 6)
    elif maximum == gf:
        h = 60 * ((bf - rf) / delta + 2)
    else: # max is bf
        h = 60 * ((rf - gf) / delta + 4)

    return (round(h), round(s, 2), round(l, 2))