>>90
これだけでいいのかな?
int is_grass(int r, int g, int b){
return ((100<=r && r<=140) && (140<=g && g<=170) && (70<=b && b<=100));
}