added rowtocolor functions and definitions