3 science-backed food hacks for preparing the ideal dinner party

switz1873 on FlickrInviting a special someone, a group of friends, or a team of colleagues by for a delicious dinner can be a great way to show off your cooking skills but can also be incredibly stressful.

Here are three techniques, provided by the American Chemical Society's Reactions YouTube series, that can help you make the perfect dinner.

There's also some cool science behind these techniques that are sure to impress any dinner guest as they happily chow down.

1. Don't cry over your onions. Refrigerate them!

Onions are a delicious addition to any guacamole, burrito, stir fry, or casserole. But they come with a price: Your tears.

Every time you cut into an onion, you release compounds called sulfenic acids.

One of these sulfenic acids mixes with other enzymes in the onion that you release during cutting.

This mixture is what then creates the eye-burning, tear-inducing gas, called syn-propanethial-S-oxide.

To protect your eyes, refrigerate onions for at least 30 minutes before chop time. This reduces the onion's tendency to release sulfenic acid. Another option is to cut the onion under water — that way the water absorbs the acid, and not your eyes.

2. Don't cook with a bad, stinky egg.

Rotten eggs not only taste gross but their putrid state gives them a fetid smell that will have any guest running for the hills instead of flocking to the dinner table.

The reason eggs go bad in the first place is because of tiny dimples that dot their shells.

These dimples are actually pores that allow air to flow in and out of the shell so the developing chick within can breathe.

But, the pores also let bacteria in, which feast on the gelatinous embryo inside breaking down proteins and emitting the putrid-scented gas called hydrogen sulphide.

Over time, the gas builds up inside of the egg. To protect your kitchen from a smelly odor, place the egg inside of a glass of water.

If the egg is filled with hydrogen sulphide, it will float to the surface. If the egg sinks, then you and your guest's noses are safe.

3. Preserve the bright-green color of your cooked vegetables.

Chlorophyll A and B are the two molecules that give vegetables their beautiful, bright-green color.

When you cook the vegetables for a long period of time, the heat breaks down the plant cells in your veggies. As a result, the cells release acids.

Normally, these acids are kept separate from the chlorophyll, but when heated, the acids escape from the plant cells and come into contact with the green molecules.

When this happens, the acids change the chlorophyll molecules' chemical composition, which, in turn, changes the color of your vegetables from a delicious-looking vibrant green to an unappealing dark green.

To prevent this from happening, cook your vegetables for approximately seven minutes. This is long enough to cook them through but not so long that the acids get the chance to do their dirty work.

Hosting a dinner will test you on many levels, and if all else fails, there's always pizza delivery.