package nxm.sys.inc;

/**
 * Wrapper class for ANSI color codes
 *
 * @author adw
 * @since NeXtMidas 4.1.1
 *
 */
public class ANSIColor {
  String value = "\033[0m";
  /** ANSI default (reset) color */
  public static final ANSIColor DEFAULT = new ANSIColor();
  /** ANSI black */
  public static final ANSIColor BLACK   = new ANSIColor("\033[0;30m");
  /** ANSI red */
  public static final ANSIColor RED     = new ANSIColor("\033[0;31m");
  /** ANSI green */
  public static final ANSIColor GREEN   = new ANSIColor("\033[0;32m");
  /** ANSI yellow */
  public static final ANSIColor YELLOW  = new ANSIColor("\033[0;33m");
  /** ANSI blue */
  public static final ANSIColor BLUE    = new ANSIColor("\033[0;34m");
  /** ANSI magenta */
  public static final ANSIColor MAGENTA = new ANSIColor("\033[0;35m");
  /** ANSI magenta looks purple */
  public static final ANSIColor PURPLE = MAGENTA;
  /** ANSI cyan */
  public static final ANSIColor CYAN    = new ANSIColor("\033[0;36m");
  /** ANSI white */
  public static final ANSIColor WHITE   = new ANSIColor("\033[0;37m");

  /**
   * Empty Constructor returns the ANSI Reset Color Code
   */
  public ANSIColor () {}

  /**
   * Create Custom ANSI Color Code
   *
   * @param colorString escaped ANSI color code
   */
  public ANSIColor (String colorString) {
    this.value = colorString;
  }

  public String toString () {
    return value;
  }
}