Where people come together to learn, code, and play. Custom-built HTTP server, site generator, and website from scratch using no external libraries. Goal is to be as minimalistic and fun as possible.
http://projectdivar.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
515 B
19 lines
515 B
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;
|
|
}
|
|
} |