def parse_rgb(v, include_number_sign=True):
    if isinstance(v, tuple):
        v = ''.join('{:02x}'.format(d) for d in v)
    if v.startswith('#'):
        v = v[1:]
    if len(v) == 3:
        v = u''.join(s + s for s in v)
    return u'#' + v if include_number_sign else v
Create a hex value color representation of the provided value
dataset/ETHPy150Open jmagnusson/Flask-Resize/flask_resize/__init__.py/parse_rgb