private static @Nullable Color _getNSColor(@NotNull String selector) {
    final Foundation.NSAutoreleasePool pool = new Foundation.NSAutoreleasePool();
    try {
      final ID nsCol = Foundation.invoke(
        Foundation.invoke("NSColor", selector),
        "colorUsingColorSpace:",
        Foundation.invoke("NSColorSpace", "genericRGBColorSpace"));
      if (nsCol.equals(ID.NIL))
        return null;

      final double nsRed    = Foundation.invoke_fpret(nsCol, "redComponent");
      final double nsGreen  = Foundation.invoke_fpret(nsCol, "greenComponent");
      final double nsBlue   = Foundation.invoke_fpret(nsCol, "blueComponent");
      final double nsAlpha  = Foundation.invoke_fpret(nsCol, "alphaComponent");

      return new Color((float)nsRed, (float)nsGreen, (float)nsBlue, (float)nsAlpha);
    } finally {
      pool.drain();
    }
  }
private static @Nullable Color _getNSColor(@NotNull String selector)