That depends on whether the black colour of the grout is due to a black dye added to the grout when they were mixing it, or if it was black pigments (like carbon dust) that was added to the grout to make it black.
There are three chemicals that all work by breaking down into more stable forms;
1. Bleach (which is NaOCl) which breaks down to form salt water, and in so doing, releases a lone oxygen atom.
2. Ozone (which is O3) which breaks down to form O2 and a lone oxygen atom.
2. Hydrogen peroxide (HOOH) which breaks down to form H2O and a lone oxygen atom.
It's that lone oxygen atom that's released when all of these chemicals spontaneously break down that does all the work. That lone oxygen atom is the horny drunken sailor of the chemical world. It'll react with anything that's unstable enough to react. It's those lone oxygen atoms that get released from bleach, Ozone and hydrogen peroxide that react with organic molecules (including dyes) and break them into small pieces. Those small pieces don't absorb certain frequencies of light the way the original molecule did, and so bleached dyes become colourless, or the same colour as the underlying fabric, usually white.
Ditto for odors. An ozone machine is the biggest gun in the arsenal when it comes to eliminating odors. When people die in a house (or car) and the body isn't discovered until neighbors start complaining about the awful smell coming from the house, it's an ozone machine they use to kill the smell before the forensics team goes in to see if there was any foul play involved. The ozone produced by those machines spontaneously breaks down to O2, and the released lone Oxygen atom reacts with the organic molecules causing the smell, and thereby breaks them down into small bits, none of which affects the olefactory glands in your nose the same way as the original molecule did. So, even though pieces of those original organic molecules are still floating around in the air, you no longer smell a stench like you did before.
It's those same lone oxygen atoms that disinfect when you clean something with bleach. The lone oxygen atoms react with organic molecules and break them to bits, and that's lethal to anything living, like germs and bacteria. A germ can't have it's organic molecules broken to pieces and still survive.
So, if the black colour in the grout comes from a dye, then I'd be concerned the bleach would affect the colour of the grout. However, the black pigments most commonly used in paints, inks, leather and paper processing is actually carbon soot. Yep, the same stuff as you find on the inside of your car's tail pipe is also what makes some of the most expensive paints and inks in the world black in colour. If your grout is black because carbon dust was added to it when it was being made, then the bleach won't affect it. So far as I know, carbon soot is the most colourfast pigment known. No matter how much UV light, or heat or anything you expose it to, it remains jet black.
But, try the bleach in an inconspicuous area just to be on the safe side.