Abstract: | A vertex-colored graph G is rainbow vertex connected if any two distinct vertices are connected by a path whose internal vertices have distinct colors. The rainbow vertex connection number of G, denoted by rvc(G), is the smallest number of colors that are needed in order to make G rainbow vertex connected. In this paper, we prove that for a connected graph G, if ({{rm diam}(overline{G}) geq 3}), then ({{rm rvc}(G) leq 2}), and this bound is tight. Next, we obtain that for a triangle-free graph ({overline{G}}) with ({{rm diam}(overline{G}) = 2}), if G is connected, then ({{rm rvc}(G) leq 2}), and this bound is tight. A total-colored path is total rainbow if its edges and internal vertices have distinct colors. A total-colored graph G is total rainbow connected if any two distinct vertices are connected by some total rainbow path. The total rainbow connection number of G, denoted by trc(G), is the smallest number of colors required to color the edges and vertices of G in order to make G total rainbow connected. In this paper, we prove that for a triangle-free graph ({overline{G}}) with ({{rm diam}(overline{G}) = 3}), if G is connected, then trc({(G) leq 5}), and this bound is tight. Next, a Nordhaus–Gaddum-type result for the total rainbow connection number is provided. We show that if G and ({overline{G}}) are both connected, then ({6 leq {rm trc} (G) + {rm trc}(overline{G}) leq 4n - 6.}) Examples are given to show that the lower bound is tight for ({n geq 7}) and n = 5. Tight lower bounds are also given for n = 4, 6. |