private String getHtmlColoredString(MemoryMatch match, boolean isSelected) {
			Color color = isSelected ? Tables.ERROR_SELECTED : Tables.ERROR_UNSELECTED;

			StringBuilder b = new StringBuilder();
			b.append("<HTML>");
			byte[] bytes = match.getBytes();
			byte[] previousBytes = match.getPreviousBytes();
			int max = bytes.length - 1;
			for (int i = 0;; i++) {
				String byteString = String.format("%02x", bytes[i]);
				if (bytes[i] != previousBytes[i]) {
					byteString = HTMLUtilities.colorString(color, byteString);
				}
				b.append(byteString);
				if (i == max) {
					break;
				}
				b.append(" ");
			}

			return b.toString();
		}
Table model for memory search results.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/gui/MemoryMatchTableModel.java