We all know that red meat turns brown when you’re grilling it and gray if you’ve overcooked it, but have you ever wondered exactly why?

The American Chemical Society has put together a video explaining what happens to the cells in steaks and burgers before and after they’ve been graced by the hot flames of your grill.

According to the video, steaks are filled with myoglobin cells that give it that bloody red color. Once those myoglobin cells reach a temperature of 140° Fahrenheit, oxygen leaves the cells and the meat takes on that great brown color we all know and love. Don’t leave the steak on the grill for too long, however. At about 169°, the meat will turn grey.

As far as tastes go, you can thank the Maillard reaction for that. From a “complex series of simultaneous reactions between amino acids and sugars,” the Maillard reaction produces a number of flavors and also contributes to the brown color of your burger.

The video also goes into the age-old debate of gas versus charcoal.

Now that you’re the resident grilling scientist, put that knowledge to good use with these recipes:

Check out the video below: