class_docstr: Plotting object allows for visualization of absolute group bias metrics and
  relative disparities calculated by Aequitas Group(), Bias(), and Fairness()
  class instances.
docstr: 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/
code: 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
  
imports: import logging
  import math
  import numpy
  import collections
  import seaborn
  import matplotlib.pyplot
  import matplotlib.colors
  import matplotlib.cm
  from aequitas import squarify_flipped
label_desc: Use image node_id 4 for calling the Plot obj's underlying member method code with example usage: obj._brightness_threshold(cls, rgb_tuple, min_brightness, light_color, dark_color) and returns: light_color, dark_color