@Override
			public boolean isEnabledForContext(ActionContext context) {
				if (!(context instanceof ListingActionContext)) {
					return false;
				}

				ListingActionContext listingContext = (ListingActionContext) context;
				ProgramSelection selection = listingContext.getSelection();
				if (selection != null && !selection.isEmpty()) {
					return isColored(selection);
				}
				return isColored(listingContext.getAddress());
			}
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