Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static float SIMILAR = 15; private static boolean isSimilar(int rgb1, int rgb2) { boolean res = Math.abs(rgb2 - rgb1) < SIMILAR; return res; } }