Make bool only true if colliding right now?

Hi. I am trying to make a bool a stay true as long as object a collides with object b.
After that, object a will immediately collide with object c, bool a should become false and bool b should become true.
Unfortunately after object a collides with object b, bool a stays true.
How can I achieve that bool a becomes false after object a isn’t colliding with object b anymore?
I hope I made clear what I want to achieve. :slight_smile:

Here is the code so far:

`void OnCollisionEnter2D(Collision2D coll){
      if(coll.gameObject.tag == "Blue"){
                colorIsMatching = true;
                isBlue = false;
        } else if(coll.gameObject.tag == "Pink"){
                colorIsMatching = true;
                isPink = false;
        } else if(coll.gameObject.tag == "Violet"){
                colorIsMatching = true;
                isViolet = false;
        } else if(coll.gameObject.tag == "Yellow"){
                colorIsMatching = true;
                isYellow = false;

Try using OnCollisionExit