protected static function buildEscapeCodes($mode_texts) {
    if (!is_array($mode_texts)) { $mode_texts = array($mode_texts); }

    $code_text = '';
    foreach ($mode_texts as $mode) {
      $constant_name = 'self::CONSOLE_'.strtoupper($mode);
      if (defined($constant_name)) {
        $code_text .= (strlen($code_text) ? ';': '').constant($constant_name);
      }
    }

    return chr(27)."[0;".$code_text."m";
  }