package readers; import java.awt.Color; public class ColorRange{ int r_h,r_l; int g_h,g_l; int b_h,b_l; public ColorRange(int r_l,int r_h,int g_l,int g_h,int b_l,int b_h) { this.r_l=r_l; this.r_h=r_h; this.g_l=g_l; this.g_h=g_h; this.b_l=b_l; this.b_h=b_h; } public boolean colorInRange(Color col) { return col.getRed()>=r_l&&col.getRed()<=r_h&&col.getGreen()>=g_l&&col.getGreen()<=g_h&&col.getBlue()>=b_l&&col.getBlue()<=b_h; } }