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

				AddressSetView set = service.getAllBackgroundColorAddresses();
				return !set.isEmpty();
			}
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