private ColorStyleAttributes getAddressAttributes(CodeUnit cu, Address destAddr, int opIndex,
			Program p) {

		if (destAddr == null) {
			return separatorAttributes;
		}

		if (destAddr.isMemoryAddress() && !p.getMemory().contains(destAddr)) {
			return badRefAttributes;
		}

		SymbolTable st = p.getSymbolTable();
		ReferenceManager refMgr = p.getReferenceManager();

		Reference ref = refMgr.getReference(cu.getMinAddress(), destAddr, opIndex);
		Symbol sym = st.getSymbol(ref);
		if (sym != null) {
			ColorStyleAttributes newAttributes = new ColorStyleAttributes();
			ColorAndStyle c = inspector.getColorAndStyle(sym);
			newAttributes.colorAttribute = c.getColor();
			newAttributes.styleAttribute = c.getStyle();
			return newAttributes;
		}
		return addressAttributes;
	}
Determine the font and color to use to render an operand when that operand is a reference.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OperandFieldHelper.java