def rgba(color):
    """ Return 4-element list of red, green, blue, alpha values. """
    if color.startswith('rgba'):
        values = [int(v) for v in color[5:-1].split(',')]
    else:
        values = [int(v) for v in color[4:-1].split(',')]
        values.append(1)
    return values