@Override
	public void writeConfigState(SaveState saveState) {
		List<Color> colorHistory = service.getColorHistory();
		if (colorHistory != null) {
			Element colorsElement = new Element(COLOR_HISTORY_LIST_XML_NAME);
			for (Color color : colorHistory) {
				Element element = new Element("COLOR");
				element.setAttribute("RGB", Integer.toString(color.getRGB()));
				colorsElement.addContent(element);
			}
			saveState.putXmlElement(COLOR_HISTORY_XML_NAME, colorsElement);
		}
	}
A plugin to provider actions for manipulating the colors of the {@link CodeViewerService}.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/colorizer/ColorizingPlugin.java