private void setMnemonicAttributes(String mnemonicText) {

		mnemonicLabel.setText(mnemonicText);
		mnemonicLabel.setForeground(DEFAULT_FG_COLOR);

		if (activeIndex == ReferenceManager.MNEMONIC) {
			mnemonicLabel.setBackground(EditReferencesProvider.BG_COLOR_ACTIVE_OPERAND);
			mnemonicLabel.setBorder(ETCHED_BORDER);
			mnemonicLabel.setOpaque(true);
		}
		else {
			mnemonicLabel.setBackground(getParent().getBackground());
			mnemonicLabel.setBorder(EMPTY_BORDER);
			mnemonicLabel.setOpaque(false);
		}
	}
Set the mnemonic text and attributes
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/InstructionPanel.java