const translateGreen = "#e7ffe7";
const translateReg = "#ffc0cb";
const translateYelllow = "#ffffbf";
const translateBlue = "#add8e6";

var boardID, boardEndpoint, cardsEndpoint, labelsEndpoint, greenLabel, yellowLabel, redLabel, blueLabel;
var labelCombo = [];
var labelName = [];
var labelColor = [];
//var configData = "";

function loadConfigFile() {
  $.getJSON("config.json", function(config) {

    //sets API endpoints for board, cards, and labels from Trello board URL
    boardID = config.boardURL.substring(config.boardURL.lastIndexOf("/") + 1);
    boardEndpoint = "boards/" + boardID;
    cardsEndpoint = boardEndpoint + "/cards";
    labelsEndpoint = boardEndpoint + "/labels";
    greenLabel = config.green;
    yellowLabel = config.yellow;
    redLabel = config.red;
    blueLabel = config.blue;

    getBoard();
  });
}
//get board name and active labels
function getBoard() {
  Trello.get(boardEndpoint, function(board) {
    var boardName = board.name + " Dashboard";
    document.getElementById('board-name').innerHTML = boardName;
  });

  Trello.get(labelsEndpoint, function(labels) {

    for (let i = 0; i < labels.length; i++) {
      labelName[i] = labels[i].name;
      labelColor[i] = labels[i].color;
      //TODO: If color === green then color = translateGreen
      labelCombo[i] = [labelName[i], labelColor[i]];
    }
  });

  getCard();
}

function getCard() {

  //label variables
  var down = "Down";
  var nonCritical = "Non-Critical";
  var testing = "Testing";

  //Get all cards for the Trello board.
  Trello.get(cardsEndpoint, function(cards) {
    var data = [];
    var name = [];
    var desc = [];
    var label = [];
    var cardLink = [];
    var checkItems = [];

    //Pull the name, description, and label fields from each card and save in data array.
    for (let i = 0; i < cards.length; i++) {
      name[i] = cards[i].name;
      checkItems[i] = cards[i].badges.checkItems;
      if (checkItems[i] > 0) {
        desc[i] = "Multiple Issues, Click See More";
      } else {
        desc[i] = cards[i].desc;
      };
      label[i] = cards[i].labels[0].name;
      cardLink[i] = cards[i].url;
      data[i] = [name[i], label[i], desc[i], cardLink[i]];
    }

    //Build DataTable on page load from the data array
    $(document).ready(function() {
        $('#example').DataTable( {
          paging: false,
          ordering: true,
          //order by status then name
          orderFixed: [[1, "asc"], [0, "asc"]],
          info: false,
          searching: false,
          data: data,
          columns: [
              { title: "Name" },
              { title: "Status" },
              { title: "Description of Current Status" },
              { title: "More Information", data: function(data, type, row, meta){
                return '<a href=' + data[3] + '>' + 'See More' + '</a>';
              }}
          ]
          //colors the status cell based on status text
          ,"columnDefs": [ {
              "targets": 1,
              "createdCell": function (td, cellData, rowData, row, col) {
                if ( cellData === down ) {
                  $(td).css('background-color', '#ffc0cb')
                } else if (cellData === nonCritical){
                  $(td).css('background-color', '#ffffbf')
                } else if (cellData === testing){
                  $(td).css('background-color', '#add8e6')
                } else {
                  $(td).css('background-color', '#e7ffe7')
                }
              }
            }]
        });
    });
  });
};

loadConfigFile();
console.log("#0000ff" + "#add7e7");


//IDEA: Can I force the string green to be changed to #e7ffe7?

@@ -234,16 +234,19 @@
 eLabel;%0A
+// 
 var labe
@@ -254,24 +254,27 @@
 Combo = %5B%5D;%0A
+// 
 var labelNam
@@ -281,16 +281,19 @@
 e = %5B%5D;%0A
+// 
 var labe
@@ -308,31 +308,8 @@
  %5B%5D;
-%0A//var configData = %22%22;
 %0A%0Afu
@@ -1039,16 +1039,19 @@
   %7D);%0A%0A 
+ //
  Trello.
@@ -1089,18 +1089,25 @@
 bels) %7B%0A
-%0A
  
+ //%0A  //
    for (
@@ -1140,24 +1140,27 @@
 th; i++) %7B%0A 
+ //
      labelNa
@@ -1180,24 +1180,27 @@
 s%5Bi%5D.name;%0A 
+ //
      labelCo
@@ -1226,16 +1226,19 @@
 color;%0A 
+ //
      //T
@@ -1291,20 +1291,23 @@
 Green%0A  
+//
     
+ 
 labelCom
@@ -1346,22 +1346,28 @@
 r%5Bi%5D%5D;%0A 
+ //
    %7D%0A 
+ //
  %7D);%0A%0A  
@@ -1717,16 +1717,41 @@
 ms = %5B%5D;
+%0A    var labelColor = %5B%5D;
 %0A%0A    //
@@ -2926,17 +2926,16 @@
  //color
-s
  the sta
@@ -3058,17 +3058,16 @@
 function
- 
 (td, cel
@@ -3189,17 +3189,16 @@
 r', 
-'#ffc0cb'
+redLabel
 )%0A  
@@ -3301,17 +3301,19 @@
 r', 
-'#ffffbf'
+yellowLabel
 )%0A  
@@ -3412,17 +3412,17 @@
 r', 
-'#add8e6'
+blueLabel
 )%0A  
@@ -3496,17 +3496,18 @@
 r', 
-'#e7ffe7'
+greenLabel
 )%0A  
@@ -3605,105 +3605,4 @@
 ();%0A
-console.log(%22#0000ff%22 + %22#add7e7%22);%0A%0A%0A//IDEA: Can I force the string green to be changed to #e7ffe7?%0A

Comment out get labels code