def _get_color(color_tuple):
    """
    Converts and returns the color in the following format:
    In canse of a rgb tuple:
        #%02x%02x%02x (i.e: #00FFCC)
    In case of a rgba tuple:
        rgba(color_tuple)
    """
    if len(color_tuple) == 3:
        return '#%02x%02x%02x' % color_tuple
    return 'rgba%s' % str(color_tuple)