def lum(c):
    """Returns luminosity as ImageMath operands.

    The formula is defined as:

        Lum(C) = 0.3 x Cred + 0.59 x Cgreen + 0.11 x Cblue

    See: https://www.w3.org/TR/compositing-1/#blendingnonseparable

    Arguments:
        c: A tuple/list of 3 ImageMath operands. The color.

    Returns:
        A tuple/list of 3 ImageMath operands. The luminosity.
    """

    r, g, b = c
    return r * .3 + g * .59 + b * .11