public static boolean isDarkMenuBar() {
    assert SystemInfoRt.isMac;

    Foundation.NSAutoreleasePool pool = new Foundation.NSAutoreleasePool();
    try {
      ID defaults = Foundation.invoke("NSUserDefaults", "standardUserDefaults");
      if (defaults.equals(ID.NIL)) {
        return false;
      }
      ID valObj = Foundation.invoke(defaults, "objectForKey:", Foundation.nsString("AppleInterfaceStyle"));
      if (valObj.equals(ID.NIL)) {
        return false;
      }

      String sval = Foundation.toStringViaUTF8(valObj);
      return sval != null && sval.equals("Dark");
    }
    finally {
      pool.drain();
    }
  }
public static boolean isDarkMenuBar()