Define colored function before using it