environment/lib/python2.7/site-packages/IPython/frontend/qt/console/styles.py
def hex_to_rgb(color):
    """Convert a hex color to rgb integer tuple."""
    if color.startswith('#'):
        color = color[1:]
    if len(color) == 3:
        color = ''.join([c*2 for c in color])
    if len(color) != 6:
        return False
    try:
        r = int(color[:2],16)
        g = int(color[2:4],16)
        b = int(color[4:],16)
    except ValueError:
        return False
    else:
        return r,g,b
def hex_to_rgb(color):
    if color.startswith('#'):
        color = color[1:]
    if len(color) == 3:
        color = ''.join([c*2 for c in color])
    if len(color) != 6:
        return False
    try:
        r = int(color[:2],16)
        g = int(color[2:4],16)
        b = int(color[4:],16)
    except ValueError:
        return False
    else:
        return r,g,b
def hex_to_rgb ( color ) : if color . startswith ( '#' ) : color = color [ 1 : ] if len ( color ) == 3 : color = '' . join ( [ c * 2 for c in color ] ) if len ( color ) != 6 : return False try : r = int ( color [ : 2 ] , 16 ) g = int ( color [ 2 : 4 ] , 16 ) b = int ( color [ 4 : ] , 16 ) except ValueError : return False else : return r , g , b
Convert a hex color to rgb integer tuple.
Convert a hex color to rgb integer tuple .