public static boolean contrastImages(String sampleImagePath, String actualImagePath,
                                         String differenceImagePath, WebElement we) throws Exception {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd-HHmmss");
		String time = sdf.format(new Date());
		BufferedImage sample = null, actual = null, difference = null;
		wePosition = we.getLocation();
		weDim = we.getSize();
		int left = wePosition.getX();
		int top = wePosition.getY();
		Integer width = weDim.getWidth();
		Integer height = weDim.getHeight();
		try {
			sample = ImageIO.read(new File(sampleImagePath + ".png"));
			actual = ImageIO.read(new File(actualImagePath));
		} catch (IOException e) {
			e.printStackTrace();
		}
		difference = new BufferedImage(sample.getWidth(), sample.getHeight(), BufferedImage.TYPE_INT_RGB);
		boolean isMatched = true;
		for (int y = top; y < top + height; ++y) {
			for (int x = left; x < left + width; ++x) {
				int expRGB = sample.getRGB(x, y);
				int actRGB = actual.getRGB(x, y);
				int newRGB = actRGB;
				if (expRGB != actRGB) {
					double deltaE = getDelta(xyz2lab(rgb2xyz(expRGB)), xyz2lab(rgb2xyz(actRGB)));
					if (deltaE > Settings.maxColorThreshold) {
						newRGB = 0xff0000;// set red in difference place
					}
					isMatched = false;
				}
				difference.setRGB(x, y, newRGB);
			}
		}
		FileOutputStream out = null;
		if (!isMatched) {
			try {
				out = new FileOutputStream(Settings.contrastImagePath + differenceImagePath + time + ".png");
				JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
				encoder.encode(difference);
			} catch (IOException e) {
				e.printStackTrace();
			} finally {
				out.close();
				System.err.println("UIstyle wrong!" + Settings.contrastImagePath + differenceImagePath + time + ".png");
			}
		}
		return isMatched;
	}