Humidity is rising and thermometers are creeping into the triple digits - all signs that the 4th of July is fast approaching. Between dazzling fireworks and delicious cold brews, millions of people will be firing up their grills and throwing on tenderloins, flank steaks, pork shoulder and many more combinations of savoury meats to celebrate.

But what actually happens to the meat when it hits high heat that makes it so mouthwatering? The video below, from our friends at the American Chemical Society, explains the delicious chemical reactions that transform a bloody chunk of meat into a tasty browned steak.

Before it touches the grill

A common misconception is that the red colour of meat comes from blood, but the muscle's ruby red hue actually stems from the animal's behaviour. Cows spend a ton of time standing, so their muscles must be able to withstand their weight for long stretches of time without fatiguing.

This creates lots of slow-twitch muscle fibres, which are more efficient at consuming oxygen and transforming it into energy because they contain more of a special protein called myoglobin, which turns red when it's bound to oxygen. The more myoglobin a piece of meat has, the redder it will be.

The same thing happens in the muscles of people who engage in endurance sports, like marathons and long-distance swimming.

If a package of meat appears grayish, the video explains, it just means that the meat's myoglobin isn't attached to oxygen. When you open the package and re-expose the meat to air, the surface of the meat will regain its ruby tint. Eventually, however, oxygen-exposed meat will turn back to grey - a sign that it's gone bad. To side-step this, many grocery stores package their meat under carbon monoxide - the carbon monoxide stops the oxygen from reacting with the muscle over time, keeping it red.

Get that charcoal out

To perfect that barbecue flavour, you need some charcoal. While gas is convenient, it totally misses the mark in terms of good barbecue.

Many people don't realise that charcoal is actually wood that's been heated in the absence of oxygen. Wood chips contain a chemical compound called lignin which, when fired up, gets broken down and produces another compound called guaiacol. The guaiacol in the charcoal is what then produces that deep, smokey wood fired flavour.

And if that isn't enough, when juices from the meat drip onto the charcoal, they produce even more delicious-tasting compounds that float upwards and saturate the meat with even more flavour.

Fire it up

The heat of the grill also changes that myoglobin - above 140 Fahrenheit (60 degrees Celsius), the molecule unfolds to the point where it can't hold onto oxygen and turns a tan colour due to a compound called hemichrome. At about 170 Fahrenheit (77 degrees Celsius), myoglobin unfolds again into a new structure called metmyoglobin, which looks a darker grayish brown.

But the "holy grail of all culinary chemical reactions," according to the video, is when the Maillard reaction rearranges the amino acids and sugars in the muscle meat to produce the quintessential browned colour and mouthwatering taste of barbecue.

This rearrangement occurs at around 285 Fahrenheit (141 degrees Celsius) giving browned meat its distinctive colour and flavour.

Overzealous grillers beware

It may be tempting to go overboard with that char to get more grilly flavour, but searing your meat into oblivion has some pretty nasty consequences. Not only does the meat lose its mouth-watering flavour and texture, but it also produces potentially cancer-causing compounds.

This can all be avoided by cooking your meat at lower temperatures and flipping it often. Insider tip: Invest in a meat thermometer to make sure your meat isn't overdone. That deep black char is generally not good for you.

Happy barbecuing!

Watch the full video, from the American Chemical Society's Reactions channel, on YouTube:

This article was originally published by Business Insider.

More from Business Insider: