You could create some helper method for this.
private boolean inColorRange(int color1, int color2) {
return Math.abs(color2-color1) <= 10;
}
This would return true if the colors are 10 or less apart.
You could rewrite your if to be something like this.
if (inColorRange(color.getRed(), color.getBlue()) &&
inColorRange(color.getBlue(), color.getGreen()) {
// Do something here if red and blue are within 10, and blue and
// green are within 10
}