changing GREEN_MIN and GREEN_MAX to COLOR_MIN and COLOR_MAX