def _rgb(y, cb, cr, a=None):
    """Conversion from ycc to rgba.

     Notes:
         Expects and returns values in [0,255] range.
    """
    r = y + 1.402 * (cr-128)
    g = y - .34414 * (cb-128) - .71414 * (cr-128)
    b = y + 1.772 * (cb-128)
    if a is not None:
        return [int(round(r)), int(round(g)), int(round(b)), int(a)]
    else:
        return [int(round(r)), int(round(g)), int(round(b))]