@Override
	public int getByteOffset(ByteBlock block, int position) {

		int o = position / 2;

		if (block.isBigEndian()) {
			return o;
		}
		return nbytes - 1 - o;
	}
Converts byte values to value represented as a 2, 4, 8, or 16-byte hex number.
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/format/HexValueFormatModel.java