Turn optional color string spec into an array.

def getcolor(spec):
    """
    Turn optional color string spec into an array.
    """
    if isinstance(spec, str):
        from matplotlib import colors
        return asarray(colors.hex2color(colors.cnames[spec]))
    else:
        return spec