Moving the cursor and changing colors is not performed using the telnet protocol.
Your telnet client emulates a terminal , most likely the VT-100 variant. To move the cursor and change the color, the server sends escape sequences specific to the terminal emulation type (which is sent in the telnet protocol negotiation).
If you do not need these escape sequences, telling the server to negotiate the telnet protocol, you are a "dumb" terminal, that should be enough. If you want them (or if the server assumes that everyone has a VT-100 and always sends them), you will have to implement a VT-100 terminal emulator (or at least enough to refuse what you don't want )
source share