code: public Color toAWTColor(TextColor color, boolean isForeground, boolean inBoldContext) {
          if(color instanceof TextColor.ANSI) {
              return colorPalette.get((TextColor.ANSI)color, isForeground, inBoldContext && useBrightColorsOnBold);
          }
          return color.toColor();
      }
docs: Given a TextColor and a hint as to if the color is to be used as foreground or not and if we currently have
  bold text enabled or not, it returns the closest AWT color that matches this.
  @param color What text color to convert
  @param isForeground Is the color intended to be used as foreground color
  @param inBoldContext Is the color intended to be used for on a character this is bold
  @return The AWT color that represents this text color