@classmethod
def _brightness_threshold(cls, rgb_tuple, min_brightness, light_color,
    dark_color='black'):
    """
        Determine ideal plot label color (light or dark) based on brightness of
        background color based on a given brightness threshold.

        Adapted from https://trendct.org/2016/01/22/how-to-choose-a-label-color-to-contrast-with-background/
        """
    if cls._check_brightness(rgb_tuple) > min_brightness:
        return dark_color
    return light_color
