there are several ways to accomplish this -- and it will depend on the location -- floor/countertop/wall ... and it will all eventually wear away .... https://www.hometalk.com/34920203/q-how-to-paint-grout
Granny...Lowe's has grout coloring. It comes in a small squirk container. I used an old toothbrush wIth a damp rag. I selected grout too light so darkened it and really like it now. Good luck!