[Unsolve]How to Toggle Gameobject between black and white color by using OnMouseDown method?

I try using OnMouseDown method but it seems not working properly, but instead when I remove the if statement in the code, it works but this way I cannot toggle.

void Start () 
	{
		print (shovel);
		thistool = GetComponent<SpriteRenderer> ();
		print (thistool.color);


	}
	

	void Update () {
		
	}

	void OnMouseDown () 
	{
		if (thistool.color == Color.black) {
			thistool.color = Color.white;
		}

		if (thistool.color == Color.white) {
			thistool.color = Color.black;
		}
	}

What your code does:
If it is black (let’s assume it is), make it white. if it is white (which is true cause you just made it), make it black. So, from black you went to black!
Try this:

         if (thistool.color == Color.black) {
             thistool.color = Color.white;
         } else if (thistool.color == Color.white) {
             thistool.color = Color.black;
         }