measure oringe threshold and calc green threshold