def hex2rgb(h):
    """
    Convert hex colors to RGB tuples

    Parameters
    ----------
    h : str
        String hex color value

    >>> hex2rgb("#ff0033")
    '255,0,51'
    """
    if not h.startswith('#') or len(h) != 7:
        raise ValueError("Does not look like a hex color: '{0}'".format(h))
    return ','.join(map(str, (int(h[1:3], 16), int(h[3:5], 16), int(h[5:7],
        16))))
