def METHOD_NAME(self, bg_color, color1, color2):
    """returns color that contrasts better in background"""
    color1_ratio = self._contrast_ratio(bg_color, color1)
    color2_ratio = self._contrast_ratio(bg_color, color2)
    if color1_ratio >= color2_ratio:
        return color1
    return color2