Given a graph, write a pseudocode function that colors the graph's vertices such that no two adjacent vertices share the same color by minimizing the total number of colors used.