Skip to main content
j g
Visitor II
January 8, 2018
Question

terminal text colour

  • January 8, 2018
  • 2 replies
  • 828 views
Posted on January 08, 2018 at 22:42

what is the correct vt100 code for changing the terminal text colour?

send_usart(0x1B);

send_usart('[');

send_usart(3);

send_usart(4);

send_usart('m');

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    January 8, 2018
    Posted on January 09, 2018 at 00:38

    send_usart(0x1B); send_usart('['); send_usart('3'); send_usart('4'); send_usart('m');

    Or sent as a string

    '\x1b[34m'

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    john doe
    Senior III
    January 9, 2018
    Posted on January 09, 2018 at 02:11

    this works:

      char colorized[42] = ''\x1b[31;1m A \x1b[32;1m B \x1b[36;1m C \x1b[37;1m D\r\n'';

      HAL_UART_Transmit(&huart2, (uint8_t *)&colorized, 42, 0x00FF);0690X00000609CvQAI.png