some refactoring of color function, adj font for graph text