def rgb_to_triple(rgb):
    """
    Returns triple of ints from rgb color in format #xxxxxx.
    
    >>> rgb_to_triple("#00bd28")
    (0, 189, 40)
    
    """
    if rgb[0] == '#':
        return (int(rgb[1:3], 16), int(rgb[3:5], 16), int(rgb[5:8], 16))
    else:
        raise ValueError("Not an rgb value.")