public static int[] rainbow(int pageNo, int totalPage, int displayCount) {
		// displayCount % 2
		boolean isEven = (displayCount & 1) == 0;
		int left = displayCount >> 1;
		int right = displayCount >> 1;

		int length = displayCount;
		if (isEven) {
			right++;
		}
		if (totalPage < displayCount) {
			length = totalPage;
		}
		int[] result = new int[length];
		if (totalPage >= displayCount) {
			if (pageNo <= left) {
				for (int i = 0; i < result.length; i++) {
					result[i] = i + 1;
				}
			} else if (pageNo > totalPage - right) {
				for (int i = 0; i < result.length; i++) {
					result[i] = i + totalPage - displayCount + 1;
				}
			} else {
				for (int i = 0; i < result.length; i++) {
					result[i] = i + pageNo - left + (isEven ? 1 : 0);
				}
			}
		} else {
			for (int i = 0; i < result.length; i++) {
				result[i] = i + 1;
			}
		}
		return result;

	}
@Test
	public void rainbowTest() {
		final int[] rainbow = PageUtil.rainbow(5, 20, 6);
		assertArrayEquals(new int[]{3, 4, 5, 6, 7, 8}, rainbow);
	}