def color(string):
    """Safely parse a color string and return a RGBA tuple."""
    return parse_color(string or '') or parse_color('black')
Safely parse a color string and return a RGBA tuple.
weasyprint/svg/utils.py