const propertiesReader = require("properties-reader");

const defaults = {
  "primary-color": "#1890ff",
  "info-color": "#1890ff",
  "link-color": "#1890ff",
  "font-size-base": "14px",
  "border-radius-base": "2px",
};

function formatAntStyles() {
  const custom = {};
  const re = /styles.ant.([\w+-]*)/;

  try {
    const properties = propertiesReader("/etc/irida/irida.conf");
    properties.each((key, value) => {
      const found = key.match(re);
      if (found) {
        custom[found[1]] = value;
      }
    });
  } catch (e) {
    console.log("No styles in `/etc/irida/irida.conf`");
  }
  return Object.assign({}, defaults, custom);
}

module.exports = { formatAntStyles };

@@ -47,16 +47,42 @@
 eader%22);
+%0Aconst fs = require(%22fs%22);
 %0A%0Aconst 
@@ -239,16 +239,127 @@
 2px%22,%0A%7D;
+%0Aconst iridaConfig = %22/etc/irida/irida.conf%22;%0Aconst propertiesConfig = %22../resources/configuration.properties%22;
 %0A%0Afuncti
@@ -390,21 +390,31 @@
  const c
-ustom
+olourProperties
  = %7B%7D;%0A 
@@ -466,70 +466,375 @@
     
-const properties = propertiesReader(%22/etc/irida/irida.conf%22
+if (fs.existsSync(propertiesConfig)) %7B%0A      const properties = propertiesReader(propertiesConfig);%0A      properties.each((key, value) =%3E %7B%0A        const found = key.match(re);%0A        if (found) %7B%0A          colourProperties%5Bfound%5B1%5D%5D = value;%0A        %7D%0A      %7D);%0A    %7D%0A%0A    if (fs.existsSync(iridaConfig)) %7B%0A      const properties = propertiesReader(iridaConfig
 );%0A
+  
     
@@ -869,24 +869,26 @@
  =%3E %7B%0A      
+  
 const found 
@@ -906,24 +906,26 @@
 (re);%0A      
+ 
+ 
 if (found) %7B
@@ -933,22 +933,34 @@
         
-custom
+  colourProperties
 %5Bfound%5B1
@@ -981,18 +981,22 @@
     
-%7D%0A
+  %7D%0A  
     %7D);%0A
   %7D 
@@ -991,16 +991,22 @@
     %7D);%0A
+    %7D%0A
   %7D catc
@@ -1116,13 +1116,23 @@
 s, c
-ustom
+olourProperties
 );%0A%7D

Check to see what values are in which file.