How can automatically set ESP8266 's serial monitor output into my application?

How can automatically set ESP8266 's serial monitor output into my application ?
And I also have one another question. How can I change the serial monitor's color. As example if my serial monitor output are in pixel numbers, how can I change it into colours? Scale color of green to red, I think so. That's all, thank you.