private boolean exportTheme() {
		String themeName = nameField.getText();
		GTheme activeTheme = themeManager.getActiveTheme();
		LafType laf = activeTheme.getLookAndFeelType();
		boolean useDarkDefaults = activeTheme.useDarkDefaults();
		File file = new File(fileTextField.getText());

		if (themeName.isBlank()) {
			setStatusText("Missing Theme Name", MessageType.ERROR, true);
			return false;
		}

		try {
			GTheme exportTheme = new GTheme(file, themeName, laf, useDarkDefaults);
			loadValues(exportTheme);
			ThemeWriter themeWriter = new ThemeWriter(exportTheme);
			themeWriter.writeTheme(file, exportAsZip);
			return true;
		}
		catch (IOException e) {
			Msg.error("Error Exporting Theme", "I/O Error encountered trying to export theme!", e);
		}
		return false;
	}
Dialog for exporting themes to external files or zip files.
Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ExportThemeDialog.java