package net.mc.main;

import java.awt.Color;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.UIManager.LookAndFeelInfo;

public class DarkTheme {
   public DarkTheme(Boolean dark) {
      if (dark) {
         this.setDark();
      }

   }

   public void setDark() {
      UIManager.put("control", new Color(48, 48, 48));
      UIManager.put("info", new Color(128, 128, 128));
      UIManager.put("nimbusBase", new Color(10, 10, 10));
      UIManager.put("nimbusAlertYellow", new Color(248, 187, 0));
      UIManager.put("nimbusDisabledText", new Color(128, 128, 128));
      UIManager.put("nimbusFocus", new Color(115, 164, 209));
      UIManager.put("nimbusGreen", new Color(176, 179, 50));
      UIManager.put("nimbusInfoBlue", new Color(66, 139, 221));
      UIManager.put("nimbusLightBackground", new Color(18, 30, 49));
      UIManager.put("nimbusOrange", new Color(191, 98, 4));
      UIManager.put("nimbusRed", new Color(169, 46, 34));
      UIManager.put("nimbusSelectedText", new Color(255, 255, 255));
      UIManager.put("nimbusSelectionBackground", new Color(104, 93, 156));
      UIManager.put("text", new Color(230, 230, 230));

      try {
         LookAndFeelInfo[] var1 = UIManager.getInstalledLookAndFeels();
         int var2 = var1.length;

         for(int var3 = 0; var3 < var2; ++var3) {
            LookAndFeelInfo info = var1[var3];
            if ("Nimbus".equals(info.getName())) {
               UIManager.setLookAndFeel(info.getClassName());
               break;
            }
         }
      } catch (ClassNotFoundException var5) {
         var5.printStackTrace();
      } catch (InstantiationException var6) {
         var6.printStackTrace();
      } catch (IllegalAccessException var7) {
         var7.printStackTrace();
      } catch (UnsupportedLookAndFeelException var8) {
         var8.printStackTrace();
      } catch (Exception var9) {
         var9.printStackTrace();
      }

   }
}
