def _getColor(color, ref):
    """ _getColor(color, reference)
    
    Get the real color as a 4 element tuple, using the reference
    color if the given color is a scalar.
    
    """
    if isinstance(color, float):
        return color * ref[0], color * ref[1], color * ref[2], ref[3]
    else:
        return color
